mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
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.
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user