Return-Path: lccheung@usc.edu Delivery-Date: Tue Sep 2 10:03:54 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.2 required=5.0 tests=AWL,BAYES_50 autolearn=ham version=3.2.3 Received: from msg-scanner1.usc.edu (msg-scanner1.usc.edu [128.125.137.210]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id m82H3sh8021655 for ; Tue, 2 Sep 2008 10:03:54 -0700 Received: from msg-mx3.usc.edu ([128.125.137.8]) by msg-scanner1.usc.edu (Sun Java System Messaging Server 6.2-7.05 (built Sep 5 2006)) with ESMTP id <0K6K00FOFVCO4R80@msg-scanner1.usc.edu> for cs551@merlot.usc.edu; Tue, 02 Sep 2008 10:04:47 -0700 (PDT) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.170]) by msg-mx3.usc.edu (Postfix) with ESMTP id E0FE232EA4 for ; Tue, 02 Sep 2008 10:04:38 -0700 (PDT) Received: by wf-out-1314.google.com with SMTP id 28so2546360wfa.27 for ; Tue, 02 Sep 2008 10:04:37 -0700 (PDT) Received: by 10.142.194.1 with SMTP id r1mr2623314wff.306.1220375076923; Tue, 02 Sep 2008 10:04:36 -0700 (PDT) Received: from ?128.125.163.179? ( [128.125.163.179]) by mx.google.com with ESMTPS id 20sm12499223wfi.11.2008.09.02.10.04.35 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 02 Sep 2008 10:04:36 -0700 (PDT) Date: Tue, 02 Sep 2008 10:04:29 -0700 From: Leslie Cheung Subject: Re: Question In-reply-to: To: cs551@merlot.usc.edu Message-id: <48BD721D.6010705@usc.edu> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7bit References: <48B5C875.1080008@usc.edu> <027d01c909b4$b09667a0$11c336e0$@edu> User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) 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 and server decides to shutdown in that case client will keep on waiting for the response.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