blob: 1967b2c8823d804570073f7d4736af1b0b4a0c49 (
plain)
1
2
3
4
5
6
7
8
9
10
|
#include <__stdio.h> // for __FILE
#include <stdio.h> // for fclose, FILE, pclose
#include <sys/wait.h> // for waitpid
int pclose(FILE *stream)
{
int stat;
fclose(stream);
return (waitpid(stream->pid, &stat, 0) < 0) ? -1 : stat;
}
|