NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lib/41085: sigaction returns EINVAL instead of -1



The following reply was made to PR lib/41085; it has been noted by GNATS.

From: Matteo Beccati <matteo%beccati.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: lib/41085: sigaction returns EINVAL instead of -1
Date: Sat, 28 Mar 2009 20:17:25 +0100

 David Holland wrote:
 >  On Sat, Mar 28, 2009 at 07:25:01AM +0000, Matteo Beccati wrote:
 >   >   From what I can see the PHP code calls sigaction() just like any other 
 >   >  libc sig* function.
 >  
 >  Yeah, and if there were shenanigans going on it'd be clear from the
 >  disassembly in your last mail.
 >  
 >  Still, it does rather look like it's not getting into the kernel at
 >  all.
 >  
 >  What's php linked against? Do any of the shared library images ldd
 >  reports define a __sigaction14 or __sigaction_sigtramp symbol, other
 >  than libc? That seems unlikely, but might as well rule out as many
 >  possible avenues of weirdness as possible.
 
 root@epia:~/compile/php-HEAD# ldd sapi/cli/php | cut -d ' ' -f 3 | grep 
 .so | xargs -n1 grep sigaction
 Binary file /usr/lib/libpthread.so.0 matches
 Binary file /usr/lib/libc.so.12 matches
 
 >  Does the same thing happen in a standalone program that calls
 >  sigaction on signal -1? e.g. something like this:
 
 Nope. That's why I wasn't able to build a self contained test case.
 
 But, given the above, look at this:
 
 root@epia:~/compile/php-HEAD# gcc pn.c
 root@epia:~/compile/php-HEAD# ./a.out
 got -1, errno 22
 
 root@epia:~/compile/php-HEAD# gcc -lpthread pn.c
 root@epia:~/compile/php-HEAD# ./a.out
 got 22, errno 12345
 


Home | Main Index | Thread Index | Old Index