On 2005–07–21, at 14:40, Nicholas Clark wrote:
GROAN. What was it that Andy Dougherty said about the fine
portability
of signal semantics...? :-)
On other BSD systems (FreeBSD and Darwin) I'm seeing the test fail
because
the PID is "0"
I can't find any man page on either that gives *any* information about
the siginfo structure.
I agree. Mac OS X tells me nothing apart from what's in signal.h,
which is hardly informative. I was even spurred into updating my
XCode docs, but to no avail. But anyway. The Single Unix
Specification has in the documentation for signal.h at http://
www.opengroup.org/onlinepubs/009695399/basedefs/signal.h.html
(annoying if quick registration may be required; new from the last
time I had occasion to use this site):
The <signal.h> header shall define the siginfo_t type as a structure
that includes at least the following members:
[From the ISO C 1999 standard]
int si_signo Signal number.
int si_code Signal code.
[Following members extend the ISO C standard]
int si_errno If non-zero, an errno value associated with
this signal, as defined in <errno.h>.
pid_t si_pid Sending process ID.
uid_t si_uid Real user ID of sending process.
void *si_addr Address of faulting instruction.
int si_status Exit value or signal.
long si_band Band event for SIGPOLL.
[Following is a real-time extension]
union sigval si_value Signal value.
followed by a table of allowed values for si_code for particular
signals, and another of the additional information you get back for
particular signals. I would hope that Darwin conforms, even though
Apple continues carefully never to claim POSIX compliance.
--
Dominic Dunlop