Date: Fri, 19 Jun 2009 09:03:28 -0400 (EDT) From: Daniel Eischen <deischen@freebsd.org> To: vasanth raonaik <vasanth.raonaik@gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: Regarding Signal IPC Message-ID: <Pine.GSO.4.64.0906190859550.9039@sea.ntplx.net> In-Reply-To: <d9f479c10906190512x4d1cf271w4107bfee0404e52a@mail.gmail.com> References: <d9f479c10906190512x4d1cf271w4107bfee0404e52a@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 19 Jun 2009, vasanth raonaik wrote: > Hello Hackers, > > I want to print out the process ID of the process which is sending the > Signal. > > Is it possible. if yes, can you please point me to any related documents. Though I have not tried this, there is an si_pid field (and other fields you might be interested in) in struct siginfo. If you use a POSIX signal handler (see sigaction(2)), a pointer to a struct siginfo is the 2nd argument to your signal handler. See <sys/signal.h> for the definition of struct siginfo. -- DE
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.64.0906190859550.9039>
