Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Oct 4 16:29:46 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 m94NTkCj028964 for ; Sat, 4 Oct 2008 16:29:46 -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 m94NZ9GH020699 for ; Sat, 4 Oct 2008 16:35:09 -0700 Message-Id: <200810042335.m94NZ9GH020699@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Port Numbers Date: Sat, 04 Oct 2008 16:35:09 -0700 From: Bill Cheng Someone wrote: > Are we not allowed to just call exit()? The grading guidelines does not say that you are not allowed to call exit(). But you may create strange situation which may cause problems later. For example, it can happen that your program gets stuck in exit() and never gives up the port. If we run our code in the grading guidelines the way we are suppose to run them, subsequent start of your node may fail and you will lose a lot of points this way! I'm not saying that this will happen for sure. But you may run the risk. So, be careful! In general, it's okay to call exit() if it can be done cleanly. For example, if you parse the startup configuration file and the port number is missing, you can simply call exit() since you haven't really done anything serious. -- Bill Cheng // bill.cheng@usc.edu