diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-02-18 03:46:54 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-02-18 03:46:54 +0000 |
commit | 46d7e2ba2235768df3d633109451fd2bee5f9291 (patch) | |
tree | a5add2d0cab28324e2c97f855959143dd9374ae9 /nptl | |
parent | a5e34e047dcc6709d994949389eb6e91709b3266 (diff) | |
download | glibc-46d7e2ba2235768df3d633109451fd2bee5f9291.zip glibc-46d7e2ba2235768df3d633109451fd2bee5f9291.tar.gz glibc-46d7e2ba2235768df3d633109451fd2bee5f9291.tar.bz2 |
Update.
2003-02-17 Ulrich Drepper <drepper@redhat.com>
* sysdeps/posix/sysconf.c (__sysconf): Test for LOGIN_NAME_MAX and
TTY_NAME_MAX and not the _POSIX_* minimal value macros.
* sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
and LOGIN_NAME_MAX.
Diffstat (limited to 'nptl')
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/pthread_kill.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/pthread_kill.c b/nptl/sysdeps/unix/sysv/linux/pthread_kill.c index 0fce02a..e1c79e7 100644 --- a/nptl/sysdeps/unix/sysv/linux/pthread_kill.c +++ b/nptl/sysdeps/unix/sysv/linux/pthread_kill.c @@ -34,7 +34,11 @@ __pthread_kill (threadid, signo) /* We have a special syscall to do the work. */ INTERNAL_SYSCALL_DECL (err); - int val = INTERNAL_SYSCALL (tkill, err, 2, pd->tid, 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); return (INTERNAL_SYSCALL_ERROR_P (val, err) ? INTERNAL_SYSCALL_ERRNO (val, err) : 0); |