about summary refs log tree commit diff
path: root/libio
diff options
context:
space:
mode:
Diffstat (limited to 'libio')
-rw-r--r--libio/iopopen.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libio/iopopen.c b/libio/iopopen.c
index 22d53a88ef..a15d3bf4b6 100644
--- a/libio/iopopen.c
+++ b/libio/iopopen.c
@@ -281,7 +281,11 @@ _IO_new_proc_close (FILE *fp)
      described in POSIX.2, such implementations are not conforming." */
   do
     {
-      wait_pid = __waitpid_nocancel (((_IO_proc_file *) fp)->pid, &wstatus, 0);
+      int state;
+      __libc_ptf_call (__pthread_setcancelstate,
+		       (PTHREAD_CANCEL_DISABLE, &state), 0);
+      wait_pid = __waitpid (((_IO_proc_file *) fp)->pid, &wstatus, 0);
+      __libc_ptf_call (__pthread_setcancelstate, (state, NULL), 0);
     }
   while (wait_pid == -1 && errno == EINTR);
   if (wait_pid == -1)