diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-02-18 21:04:15 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-02-18 21:04:15 +0000 |
commit | 2f7dc59492a588a9b196c13a519fb5f2e42c274d (patch) | |
tree | f72fb330f6939009c95b08d23ca26e45b7b68ab1 /nptl/sysdeps | |
parent | ba25bb0f1d140994dc0b6ee5f074d1237c493ee5 (diff) | |
download | glibc-2f7dc59492a588a9b196c13a519fb5f2e42c274d.tar glibc-2f7dc59492a588a9b196c13a519fb5f2e42c274d.tar.gz glibc-2f7dc59492a588a9b196c13a519fb5f2e42c274d.tar.bz2 glibc-2f7dc59492a588a9b196c13a519fb5f2e42c274d.zip |
Update.
2003-02-18 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/ttyname_r.c (__ttyname_r): Recognize
invalid file descriptors and missing access permissions.
Diffstat (limited to 'nptl/sysdeps')
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/pthread_kill.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/pthread_kill.c b/nptl/sysdeps/unix/sysv/linux/pthread_kill.c index e1c79e79b3..ca6dfd887a 100644 --- a/nptl/sysdeps/unix/sysv/linux/pthread_kill.c +++ b/nptl/sysdeps/unix/sysv/linux/pthread_kill.c @@ -36,9 +36,10 @@ __pthread_kill (threadid, signo) /* The kernel returns EINVAL for PIDs <= 0. This is not nice since the user would expect ESRCH. Correct it here. */ - int val = (pd->tid > 0 - ? INTERNAL_SYSCALL (tkill, err, 2, pd->tid, signo) - : ESRCH); + if (pd->tid <= 0) + return ESRCH; + + int val = INTERNAL_SYSCALL (tkill, err, 2, pd->tid, signo); return (INTERNAL_SYSCALL_ERROR_P (val, err) ? INTERNAL_SYSCALL_ERRNO (val, err) : 0); |