summaryrefslogtreecommitdiff
path: root/src/stdio/pclose.c
blob: c2fe7a24a85107e95e58c8aa947524156dcca6b6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
#include "stdio_impl.h"

int pclose(FILE *f)
{
	int status;
	fclose(f);
	while (waitpid(f->pipe_pid, &status, 0) == -1)
		if (errno != EINTR) return -1;
	return status;
}