|
@@ -3,8 +3,9 @@
|
|
int pclose(FILE *f)
|
|
int pclose(FILE *f)
|
|
{
|
|
{
|
|
int status;
|
|
int status;
|
|
|
|
+ pid_t pid = f->pipe_pid;
|
|
fclose(f);
|
|
fclose(f);
|
|
- while (waitpid(f->pipe_pid, &status, 0) == -1)
|
|
|
|
|
|
+ while (waitpid(pid, &status, 0) == -1)
|
|
if (errno != EINTR) return -1;
|
|
if (errno != EINTR) return -1;
|
|
return status;
|
|
return status;
|
|
}
|
|
}
|