| Date: Fri, 04 Feb 2005 10:13:36 +0000
| From: Dale Dunlea <daledunlea at commergy.com>
|[ ... ]
| - When the signal handler is called, how can I tell which child process
| is generating it.
man 2 sigaction
SIGACTION(2) Linux Programmer's Manual SIGACTION(2)
[ ... ]
sa_flags specifies a set of flags which modify the
behaviour of the signal handling process. [ ... ]
SA_SIGINFO
The signal handler takes 3 arguments, not
one. In this case, sa_sigaction should be
set instead of sa_handler. [ ... ]
The siginfo_t parameter to sa_sigaction is a struct with
the following elements [ ... ]
pid_t si_pid; /* Sending process ID */
[ ... ]
SIGCHLD [ fills ] in si_pid [ ... ]
howwever, you would be far better off if you did not use SIGCHLD
at all. the advice given earlier, use waitpid(2), is a better
approach.
cheers!
-blf-
--
Experienced (20+ yrs) kernel/software Eng: | Brian Foster Montpellier,
• Unix, embedded, &tc; • Linux; • doc; | blf at utvinternet.ie FRANCE
• IDL, automated testing, process, &tc. | Stop E$$o (ExxonMobile)!
Résumé (CV) http://www.blf.utvinternet.ie | http://www.stopesso.com
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!