Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Sep 11 08:51:05 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 m8BFp5QX005742 for ; Thu, 11 Sep 2008 08:51:05 -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 m8BFonBd008348 for ; Thu, 11 Sep 2008 08:50:49 -0700 Message-Id: <200809111550.m8BFonBd008348@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Regarding select() Date: Thu, 11 Sep 2008 08:50:49 -0700 From: Bill Cheng Someone wrote: > I am having some trouble implementing the code for select. > > When I don't run the client, my server times out after the specified > interval, but when I run the client, my select function always returns -1. > > Any hints on what could be going wrong ? When select() returns -1, shouldn't you check errno? -- Bill Cheng // bill.cheng@usc.edu