Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Sep 6 08:48:34 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 m86FmY04022214 for ; Sat, 6 Sep 2008 08:48:34 -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 m86Fl6En023841 for ; Sat, 6 Sep 2008 08:47:06 -0700 Message-Id: <200809061547.m86Fl6En023841@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Warmup Proj1 questions Date: Sat, 06 Sep 2008 08:47:06 -0700 From: Bill Cheng Someone wrote: > I have the following queries: > > 1) server -t abc 12121 > for this command should the server give bad timeout value and > then exit or set value to 60 You should print error message and exit. > 2) if file size is greater than max value of unsigned integer > what is the action to be taken Since the return value is a string, the protocol itself does not have a limit on how long this value can be! So, you can either send the result back or you can send FSZ_FAIL. (By the way, if there is a file on nunki that's that big, please let me know!) > 3) in case of get request if file read operation fails or malloc > fails should the server shutdown Your server should never die because it cannot finish an operation. It should die only due to conditions specified in the spec or due to system failure (i.e., nunki is shutting down, nunki is out of resources, etc.) For any software you write in this class, if malloc() fails, you should print a message and exit because there is nothing you can do or should do since you don't know why malloc() failed. -- Bill Cheng // bill.cheng@usc.edu