Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Sep 2 21:06:10 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 m8346ASI028517 for ; Tue, 2 Sep 2008 21:06:10 -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 m8343ono002810 for ; Tue, 2 Sep 2008 21:03:50 -0700 Message-Id: <200809030403.m8343ono002810@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: FW: Question Date: Tue, 02 Sep 2008 21:03:50 -0700 From: Bill Cheng Someone wrote: > As we need to keep track of the child PIDs , but before inserting the any > child pid into the list or dynamic array if the server decide to shutdown in > that case what to do with that child process who's id is not present in the > array. I'm not sure if I'm understanding your question correctly. Are you asking about the case where no child process has ever been created? If that's the case, there is no child pids to wait for. If a child process has been created, why won't you have the child process's pid? When you call fork(), it returns the child process's pid and you can stick this pid into the array you were talking about. -- Bill Cheng // bill.cheng@usc.edu