aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/spawni.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/spawni.c')
-rw-r--r--sysdeps/unix/sysv/linux/spawni.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/spawni.c b/sysdeps/unix/sysv/linux/spawni.c
index bb3eecfde1..5c5fcad5f4 100644
--- a/sysdeps/unix/sysv/linux/spawni.c
+++ b/sysdeps/unix/sysv/linux/spawni.c
@@ -340,7 +340,9 @@ __spawnix (pid_t * pid, const char *file,
}
/* Disable asynchronous cancellation. */
- int cs = LIBC_CANCEL_ASYNC ();
+ int state;
+ __libc_ptf_call (__pthread_setcancelstate,
+ (PTHREAD_CANCEL_DISABLE, &state), 0);
args.file = file;
args.exec = exec;
@@ -386,7 +388,7 @@ __spawnix (pid_t * pid, const char *file,
__sigprocmask (SIG_SETMASK, &args.oldmask, 0);
- LIBC_CANCEL_RESET (cs);
+ __libc_ptf_call (__pthread_setcancelstate, (state, NULL), 0);
return ec;
}