FreeBSD/usr.sbin/pmcstudy/pmcstudy.c
/*
 * pclose --
 *	Pclose returns -1 if stream is not associated with a `popened' command,
 *	if already `pclosed', or waitpid returns an error.
 */
pclose
Pclose returns -1 if stream is not associated with a `popened' command,
if already `pclosed', or waitpid returns an error.
pclose Pclose returns - 1 if stream is not associated with a ` popened ' command if already ` pclosed ' or waitpid returns an error .
static void
my_pclose(FILE *io, pid_t the_pid)
{
	int pstat;
	pid_t pid;
	(void)fclose(io);
	kill(the_pid, SIGTERM);
	do {
		pid = wait4(the_pid, &pstat, 0, (struct rusage *)0);
	} while (pid == -1 && errno == EINTR);
}
static void my_pclose ( FILE * io , pid_t the_pid ) { int pstat ; pid_t pid ; ( void ) fclose ( io ) ; kill ( the_pid , SIGTERM ) ; do { pid = wait4 ( the_pid , & pstat , 0 , ( struct rusage * ) 0 ) ; } while ( pid == -1 && errno == EINTR ) ; }
pclose
      Pclose returns -1 if stream is not associated with a `popened' command,
      if already `pclosed', or waitpid returns an error.
pclose Pclose returns - 1 if stream is not associated with a ` popened ' command if already ` pclosed ' or waitpid returns an error .
/*
	 * Find the appropriate file pointer and remove it from the list.
	 */ /* Die if you are not dead! */