Article View: news.software.nntp
Article #765Re: Rn and ^Z on IRIX
From: Reg Quinton
Date: Tue, 06 Nov 1990 08:26
Date: Tue, 06 Nov 1990 08:26
43 lines
1866 bytes
1866 bytes
In article <1990Nov5.121957@ria.ccs.uwo.ca>, reggers@ria.ccs.uwo.ca (Reg
Quinton) writes:
|> I'm having problems getting rn (actually rrn) to handle ^Z properly
|> on an IRIX machine. If I stop rn with a ^Z, and then later bring
|> it up with an fg command I get:
|> ----
|> [12:21pm grafxa] fg
|> ./rn
|> rn read error: Interrupted system call
|>
|> Caught an internal error--.newsrc restored
|> ----
I don't know if this is fixed in patch 48 (I see that's coming out as I
write). However, here's the problem and solution. On some machines the
^Z,
fg sequence can give you interrupted a read operation. This returns an
errno == EINTR. The code in term.c should be modified as follows to try
the read again if such an error occurs.
---
/* get a character into a buffer */
void
getcmd(whatbuf)
register char *whatbuf;
{
....
for (;;) {
int_count = 0;
errno = 0;
if (read_tty(whatbuf,1) < 0)
/* on return from ^Z, try again */
if (errno == EINTR) continue;
else
if (!errno)
errno = EINTR;
else {
perror(readerr);
sig_catcher(0);
}
Technical Details
Message-ID:
<1990Nov6.082615@ria.ccs.uwo.ca>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp!utzoo!utstat!news-server.csri.toronto.edu!utgpu!watserv1!ria!ria.ccs.uwo.ca!reggersReferences:
<1990Nov5.121957@ria.ccs.uwo.ca>Show Full Headers
Complete Article Headers
Message-ID: <1990Nov6.082615@ria.ccs.uwo.ca> Subject: Re: Rn and ^Z on IRIX Date: Tue, 06 Nov 1990 08:26:15 +0000 From: reggers@ria.ccs.uwo.ca (Reg Quinton) References: <1990Nov5.121957@ria.ccs.uwo.ca> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp!utzoo!utstat!news-server.csri.toronto.edu!utgpu!watserv1!ria!ria.ccs.uwo.ca!reggers Newsgroups: news.software.b,news.software.nntp Sender: news@ria.ccs.uwo.ca Reply-To: reggers@ria.ccs.uwo.ca (Reg Quinton) Followup-To: news.software.b Organization: Univ. Western Ontario, London Ont. CA Lines: 42