Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!husc6!cmcl2!yale!bunker!wtm
From: wtm@bunker.UUCP (Bill McGarry)
Newsgroups: comp.sources.bugs,news.software.b
Subject: Re: Finally at rn patchlevel 40 and having problems
Message-ID: <3097@bunker.UUCP>
Date: Sun, 22-Nov-87 23:12:51 EST
Article-I.D.: bunker.3097
Posted: Sun Nov 22 23:12:51 1987
Date-Received: Wed, 25-Nov-87 07:00:40 EST
References: <795@tellab5.UUCP>
Reply-To: wtm@bunker.UUCP (Bill McGarry)
Organization: Bunker Ramo, an Olivetti Company, Shelton, CT
Lines: 39
Keywords: rn bugs tty
Xref: mnetor comp.sources.bugs:494 news.software.b:968

[I just found out that my original reply to this article got
 mangled, so I've cancelled the original and am trying a reply once
 again.]

In article <795@tellab5.UUCP> dpb@tellab5.UUCP (Darryl Baker) writes:
>
>	I have in the last couple of weeks install news 2.11 patchlevel
>	11 and rn 4.3 patchlevel 40 and funny things are happening.
>	Sometimes when people do a save and name the file to save to
>	everything looks like it went fine but when they look for the
>	file it is not there. I'm having the problem that sometimes
>	when I do a r,R,f, or F I get the leaving cbreak mode and the
>	other stuff I'm supposed to get from rn but nothing from Rnmail
>	or Pnews just the reentering cbreak message. Also if I do a
>	shell escape and this problem is happening I can run binaries
>	but not shell scripts like Pnews or Rnmail.
>

The shell uses file descriptors 10 and 11 (at least in 4.3 BSD) to 
save standard in and standard out.  If those file descriptors are already
being used, then the shell will just exit without any error messages
whatsoever.  (Why the shell doesn't just use whatever file descriptors
are available rather than hard coding to 10 and 11 is beyond me.)

Anyway, there are cases where this problem will happen with "rn" and
since "Rnmail" and "Pnews" are shell scripts, the user will not
be able to use them.  One case of which I know is when the 'M' command
is used to mark an article as unread.  In this situation, "rn" opens
one more file (.rndelay) which pushes rn over the limit until that
newsgroup is finished.

One solution is to have rn close all file descriptors 3 and above
between doing the fork and the execlp.

				Bill McGarry
				Bunker Ramo, Shelton, CT
				(203) 337-1518

     PATH:  {philabs, decvax, fortune, yale}!bunker!wtm