LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Signal handling

[ILUG] Signal handling

Brian Foster blf at blf.utvinternet.co.uk
Sat Feb 5 03:46:57 GMT 2005


  | 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



More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


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!
RSS Version
Powered by Dell