Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Sep 2 11:40:03 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 m82Ie2Sj022635 for ; Tue, 2 Sep 2008 11:40:02 -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 m82IbbEe027398 for ; Tue, 2 Sep 2008 11:37:37 -0700 Message-Id: <200809021837.m82IbbEe027398@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Question Date: Tue, 02 Sep 2008 11:37:37 -0700 From: Bill Cheng Regarding (2) below, I just want to add the following: Before closing a socket, you should call shutdown() on the socket. This way, the other would notice that the socket is closed immediately. If you don't call shutdown(), it can take a long time before the other side realizes that this has happened. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Tue, 02 Sep 2008 10:04:29 -0700 From: Leslie Cheung To: cs551@merlot.usc.edu Subject: Re: Question Someone wrote: > 1 )Which timer function we should use so that server can send the signal to the child processes after interval of time. > > You can use any function that works (except busy-wait). I'd recommend using "select". Please read the man page on nunki for details (run "man -s 3s select" on nunki). > 2) If there is any child process who did not send the response to client an d server decides to shutdown in that case client will keep on waiting for the r esponse.So do we have to keep it on waiting for response? > You need to implement a timeout mechanism so that the client will not wait forever. You can use "select" to do this. Now the question is how long the client should wait. Well, we haven't specified this in the spec, so you need to choose a reasonable value, and document this in README. --Leslie