Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Sep 6 19:35:07 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id m872Z7xJ028551 for ; Sat, 6 Sep 2008 19:35:07 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.14.2/8.14.1) with ESMTP id m872Xjog030605 for ; Sat, 6 Sep 2008 19:33:45 -0700 Message-Id: <200809070233.m872Xjog030605@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Child Processes Date: Sat, 06 Sep 2008 19:33:45 -0700 From: Bill Cheng Someone wrote: > I have one question > > Do we have to store pids of child processes if we are handling SIG_CHLD and calling > waitpid (WAIT_ANY, &status, WNOHANG); in the signal handler? Your server process should not quit until all the child processes have terminated. One way is to store the child pids and make sure that every one of them have terminated. If you have other ways to make sure, that would be fine too. -- Bill Cheng // bill.cheng@usc.edu