Date: Mon, 10 Feb 2003 19:52:06 +0100 (CET) From: Alexander <amour@amour.ath.cx> To: freebsd-questions@freebsd.org Subject: SIGCHLD Message-ID: <20030210193525.D78057-100000@amour.ath.cx>
next in thread | raw e-mail | index | archive | help
Hello I'm having a problem when running a program that forks a child. The program handles SIGCHLD with its own function that calls waitpid(). So the program thinks that when SIGCHLD is raised then the child is terminated. But the parent gets SIGCHLD even if the child is still running and then the following happens - The child is doing its job but the parent calls the SIGCHLD handler and gets into waitpid() (although it shouldn't !) SIGNAL(3) manual page says: Name Default Action Description SIGCHLD discard signal child status has changed Does this mean that SIGCHLD is not only raised when the process is terminated ? And does it mean, "always ignore SIGCHLD and never trust it" ? And what does this mean "child status has changed" ? When is it changed ? thanks P.S. Please include my mail when replying. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030210193525.D78057-100000>