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: David Holland <dholland-bugs%netbsd.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: lib/41085: sigaction returns EINVAL instead of -1
Date: Sat, 28 Mar 2009 04:44:06 +0000

 On Sat, Mar 28, 2009 at 12:10:05AM +0000, Matteo Beccati wrote:
  >  It seems that sigaction() validates signo itself and returns EINVAL 
  >  without making the syscall, or something along the lines.
 
 Is maybe PHP doing some kind of macro wrapper around sigaction? This
 is PHP we're talking about after all... and while it's possible that
 ktrace could just miss the sigaction call entirely, that doesn't seem
 very likely. (And in fact, the code in libc is such that if you try to
 sigaction on signal -1, it ought to call __sigaction_sigtramp
 *twice*.)
 
 I've looked over the kernel and libc code involved and I don't see any
 plausible way for it to mix the return value and error code, unless
 something Xen-specific is causing the carry flag (which distinguishes
 error returns from real return values) to get cleared in the low-level
 code on the way back from the system call. But for that one would need
 to explain why ktrace isn't seeing anything. Plus, if it's there and
 it's repeatable, one would expect it to affect a lot more than just
 sigaction.
 
 Can you easily check if the problem occurs only under Xen?
 
 -- 
 David A. Holland
 dholland%netbsd.org@localhost
 


Home | Main Index | Thread Index | Old Index