rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: Chet Ramey <chet@odin.INS.CWRU.Edu>
To: schwartz@groucho.cs.psu.edu
Cc: arnold@cc.gatech.edu, rc@archone.tamu.edu, chet@odin.INS.CWRU.Edu
Subject: Re: signal blocking?
Date: Wed, 8 Apr 1992 08:18:30 -0500	[thread overview]
Message-ID: <9204081318.AA26738.SM@odin.INS.CWRU.Edu> (raw)
In-Reply-To: Message from schwartz@groucho.cs.psu.edu of Tue, 7 Apr 1992 18:24:45 -0500

> | 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


             reply	other threads:[~1992-04-08 13:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1992-04-08 13:18 Chet Ramey [this message]
1992-04-08 18:33 ` schwartz
  -- strict thread matches above, loose matches on Subject: below --
1992-04-08 15:49 Byron Rakitzis
1992-04-07 22:25 Arnold Robbins
1992-04-07 23:24 ` schwartz
1992-04-07 22:22 Arnold Robbins
     [not found] <91Dec18.230318cst.18887@archone.tamu.edu>
     [not found] ` <199201222335.28010.rc.badaj@vetsci.su.oz.au>
     [not found]   ` <92Jan28.114835cst.18891@archone.tamu.edu>
1992-04-07 21:18     ` Arnold Robbins
1992-04-07 22:12       ` schwartz
1992-04-08  1:37       ` John Mackin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9204081318.AA26738.SM@odin.INS.CWRU.Edu \
    --to=chet@odin.ins.cwru.edu \
    --cc=arnold@cc.gatech.edu \
    --cc=chet@po.CWRU.Edu \
    --cc=rc@archone.tamu.edu \
    --cc=schwartz@groucho.cs.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).