diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2019-11-13 10:42:05 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2019-12-19 16:11:09 -0300 |
commit | 478f70780f28a270205ddbe8cb6ec29cb41d586e (patch) | |
tree | c46c10ac218ba891188667249f5cb52755e4351c /sysdeps/unix/sysv/linux/waitpid_nocancel.c | |
parent | 6a265e577e8d7c9c950a793139df19b2d050ce5b (diff) | |
download | glibc-478f70780f28a270205ddbe8cb6ec29cb41d586e.tar glibc-478f70780f28a270205ddbe8cb6ec29cb41d586e.tar.gz glibc-478f70780f28a270205ddbe8cb6ec29cb41d586e.tar.bz2 glibc-478f70780f28a270205ddbe8cb6ec29cb41d586e.zip |
Remove __waitpid_nocancel
It enables and disables cancellation with pthread_setcancelstate
before calling the waitpid. It simplifies the waitpid implementation
for architectures that do not provide either __NR_waitpid or
__NR_wait4.
Checked on x86_64-linux-gnu.
Diffstat (limited to 'sysdeps/unix/sysv/linux/waitpid_nocancel.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/waitpid_nocancel.c | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/sysdeps/unix/sysv/linux/waitpid_nocancel.c b/sysdeps/unix/sysv/linux/waitpid_nocancel.c deleted file mode 100644 index 3697c6b938..0000000000 --- a/sysdeps/unix/sysv/linux/waitpid_nocancel.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Linux waitpid syscall implementation -- non-cancellable. - Copyright (C) 2018-2019 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#include <errno.h> -#include <sysdep-cancel.h> -#include <stdlib.h> -#include <sys/wait.h> -#include <not-cancel.h> - -__pid_t -__waitpid_nocancel (__pid_t pid, int *stat_loc, int options) -{ -#ifdef __NR_waitpid - return INLINE_SYSCALL_CALL (waitpid, pid, stat_loc, options); -#else - return INLINE_SYSCALL_CALL (wait4, pid, stat_loc, options, NULL); -#endif -} -libc_hidden_def (__waitpid_nocancel) |