diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-03-10 05:25:48 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-03-10 05:25:48 +0000 |
commit | 8b9d605485be779bb03778e780e9875525ec2ca4 (patch) | |
tree | 38c566c233a1d11a10b2bb68a488dfd9e17e9b04 /nptl/sysdeps/unix/sysv/linux/raise.c | |
parent | 9363dbb847a7e29d1abfffabc59fb142cf956df2 (diff) | |
download | glibc-8b9d605485be779bb03778e780e9875525ec2ca4.tar.gz glibc-8b9d605485be779bb03778e780e9875525ec2ca4.tar.xz glibc-8b9d605485be779bb03778e780e9875525ec2ca4.zip |
Update.
2004-02-09 Jakub Jelinek <jakub@redhat.com> * posix/Makefile (tests): Add tst-vfork2. * posix/tst-vfork1.c (do_test): Fix comment. * posix/tst-vfork2.c: New test.
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 |