From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from odin.INS.CWRU.Edu ([129.22.8.102]) by archone.tamu.edu with SMTP id <45325>; Wed, 8 Apr 1992 08:24:35 -0500 Received: by odin.INS.CWRU.Edu (5.65b+ida+/CWRU-1.5-ins) id AA26765; Wed, 8 Apr 92 09:21:26 -0400 (from chet for rc@archone.tamu.edu) Date: Wed, 8 Apr 1992 08:18:30 -0500 From: Chet Ramey To: schwartz@groucho.cs.psu.edu Subject: Re: signal blocking? Cc: arnold@cc.gatech.edu, rc@archone.tamu.edu, chet@odin.INS.CWRU.Edu Reply-To: chet@po.CWRU.Edu In-Reply-To: Message from schwartz@groucho.cs.psu.edu of Tue, 7 Apr 1992 18:24:45 -0500 Message-Id: <9204081318.AA26738.SM@odin.INS.CWRU.Edu> Read-Receipt-To: chet@po.CWRU.Edu > | Get this. The function works ok with the version of rc linked with > | the readline library, and bombs on the version without it. Sigh. > > That's because readline ignores the return code from read(), while > Byron carefully checks it. Oh, please, give me a break. Why not check these things out before shooting from the hip? >From rl_getc: result = read (fileno (stream), &c, sizeof (unsigned char)); if (result == sizeof (unsigned char)) return (c); /* If zero characters are returned, then the file that we are reading from is empty! Return EOF in that case. */ if (result == 0) return (EOF); ... and so on ... Chet -- ``The use of history as therapy means the corruption of history as history.'' -- Arthur Schlesinger Chet Ramey, Case Western Reserve University Internet: chet@po.CWRU.Edu