This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: SA_SIGINFO and signal info ?

Samuel Thibault, le Sat 03 Dec 2005 01:19:11 +0100, a écrit :
> Igor Pechtchanski, le Fri 02 Dec 2005 18:56:56 -0500, a écrit :
> > > Cygwin defines SA_SIGINFO, but it doesn't seem to be implemented: the
> > > following program gets in "info" just 0x0 or a strange pointer. Could
> > > it be supported somehow? The bit of information I'd really need is
> > > info->si_code, so as to know whether the signal is sent by "kernelspace"
> > > (because of alarm, setitimer, ...) or by "userspace" (kill, raise).
> > 
> > AFAICS, this should work in the snapshots, according to
> > <>.
> pthread_kill still gives 0 as info to
> the handler (and unfortunately, that's precisely the case I need)

And posix says in sigaction documentation: "If the value of si_code is
less than or equal to 0, then the signal was generated by a process and
si_pid and si_uid, respectively, indicate the process ID and the real
user ID of the sender."

So SI_USER should rather be defined to 0.

Mmm, btw, SIGALRM sets 0 in si_code, while it should set SI_KERNEL.


Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]