From owner-freebsd-questions Mon Feb 10 10:52:17 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A452937B401 for ; Mon, 10 Feb 2003 10:52:16 -0800 (PST) Received: from amour.ath.cx (p213.54.14.236.tisdip.tiscali.de [213.54.14.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id D41D943FB1 for ; Mon, 10 Feb 2003 10:52:14 -0800 (PST) (envelope-from amour@amour.ath.cx) Received: from amour.ath.cx (amour@localhost.ath.cx [127.0.0.1]) by amour.ath.cx (8.12.6/8.12.6) with ESMTP id h1AIqD1E078506 for ; Mon, 10 Feb 2003 19:52:13 +0100 (CET) (envelope-from amour@amour.ath.cx) Received: from localhost (amour@localhost) by amour.ath.cx (8.12.6/8.12.6/Submit) with ESMTP id h1AIq72v078503 for ; Mon, 10 Feb 2003 19:52:07 +0100 (CET) Date: Mon, 10 Feb 2003 19:52:06 +0100 (CET) From: Alexander To: freebsd-questions@freebsd.org Subject: SIGCHLD Message-ID: <20030210193525.D78057-100000@amour.ath.cx> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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