diff options
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/raise.c')
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/raise.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/raise.c b/nptl/sysdeps/unix/sysv/linux/raise.c index ac54fa217e..28d03c3837 100644 --- a/nptl/sysdeps/unix/sysv/linux/raise.c +++ b/nptl/sysdeps/unix/sysv/linux/raise.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -18,6 +18,7 @@ 02111-1307 USA. */ #include <errno.h> +#include <limits.h> #include <signal.h> #include <sysdep.h> #include <nptl/pthreadP.h> @@ -53,10 +54,10 @@ raise (sig) #if __ASSUME_TGKILL || defined __NR_tgkill else /* raise is an async-safe function. It could be called while the - fork function temporarily invalidated the PID field. Adjust for + fork/vfork function temporarily invalidated the PID field. Adjust for that. */ if (__builtin_expect (pid <= 0, 0)) - pid = pid == 0 ? selftid : -pid; + pid = (pid & INT_MAX) == 0 ? selftid : -pid; #endif #if __ASSUME_TGKILL |