Xref: utzoo news.software.nntp:458 news.software.b:3815 Path: utzoo!utstat!helios.physics.utoronto.ca!jarvis.csri.toronto.edu!cs.utexas.edu!usc!brutus.cs.uiuc.edu!ux1.cso.uiuc.edu!uxf.cso.uiuc.edu!chris From: chris@uxf.cso.uiuc.edu (Christopher Martin) Newsgroups: news.software.nntp,news.software.b Subject: Re: rrn dies when brought back into foreground Summary: I think it's a bug... Message-ID: <1989Dec12.042641.19976@ux1.cso.uiuc.edu> Date: 12 Dec 89 04:26:41 GMT References: <1989Dec10.153749.23565@phri.nyu.edu> Sender: news@ux1.cso.uiuc.edu (News) Organization: University of Illinois at Urbana-Champaign Lines: 43 In article <1989Dec10.153749.23565@phri.nyu.edu> roy@phri.nyu.edu (Roy Smith) writes: > > A few weeks ago I install rrn on our Sun-3/50s running SunOS-3.5.2. >Every once in a while, if you suspend rrn, when you bring it back into the >foreground, you get "read error: not owner" and rrn exits. Anybody have >any idea what's going on? We're running rrn 4.3.1.4, patchlevel 39. > I just hunted this down this afternoon. It seems to me that there may be a bug in the code. It seems that errno shouldn't be looked at unless read_tty returns an error. Here's a diff off rrn 4.3.2.5: *** term.c.DIST Mon Dec 11 14:17:41 1989 --- term.c Mon Dec 11 14:44:16 1989 *************** *** 733,744 **** for (;;) { int_count = 0; errno = 0; ! if (read_tty(whatbuf,1) < 0 && !errno) ! errno = EINTR; ! if (errno && errno != EINTR) { ! perror(readerr); ! sig_catcher(0); ! } #ifdef PUSHBACK if (*whatbuf & 0200 || no_macros) { *whatbuf &= 0177; --- 733,745 ---- for (;;) { int_count = 0; errno = 0; ! if (read_tty(whatbuf,1) < 0) ! if (!errno) ! errno = EINTR; ! else { ! perror(readerr); ! sig_catcher(0); ! } #ifdef PUSHBACK if (*whatbuf & 0200 || no_macros) { *whatbuf &= 0177;