🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #21197

Re: slrn barfs on Ctrl-Z (linux)

#21197
From: John E. Davis
Date: Thu, 02 May 1996 00:00
47 lines
2261 bytes
On 1 May 1996 19:30:59 GMT, Felix von Leitner <leitner@xorn.prz.tu-berlin.de>
wrote:
 : On 1 May 1996 13:06:13 GMT, Tony Galliford <gallto@amy.apana.org.au> wrote:
 : > I can't get slrn to re-start after stopping it with a ^Z on linux.
 : 
 : Works like a breeze for me (I'm using the Z shell, not that darn
 : mega-broken bash -- in fact, I could bash bash for hours for the things
 : it did to me, not executing shell scripts correctly).  I once even had
 : to hack around in the sources to get bash to accept the exit error
 : codes.

The problem turned out to be that Tony was using slrn in a bash shell script:

      #!/bin/sh
      /usr/local/bin/slrn -C $*
      
When ^Z was pressed, the login shell sent the foreground process a signal
which both slrn and bash received.  Bash simply exited and slrn apparantly
stopped and disappeared into the background.

I believe that one should use:

      #!/bin/sh
      exec /usr/local/bin/slrn -C $*

An interesting difference between bash and sh is brought out by 0.8.8.1.
Pressing ^Z while running the preceeding script using the real sh suspends
the news reader.  However, for systems that use bash for sh, pressing ^Z
will produce the slrn message:

    "Suspension not allowed by shell."

Is bash wrong here?

Incidently, I think it is better to do away with such a simple script and
use an alias (csh):

      alias slrn 'slrn -C'

-- 
John E. Davis                   Center for Space Research/AXAF Science Center
617-258-8119                    MIT 37-662c, Cambridge, MA 02139
http://space.mit.edu/~davis


Technical Details
Message-ID: <slrn4oi6lj.1ec.davis@wiwaxia.mit.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
References: <slrn4oeo1s.cb8.gallto@amy.apana.org.au> <slrn4ofevg.vs.leitner@xorn.prz.tu-berlin.de>

Show Full Headers
Complete Article Headers
Message-ID: <slrn4oi6lj.1ec.davis@wiwaxia.mit.edu>
Subject: Re: slrn barfs on Ctrl-Z (linux)
Date: Thu, 02 May 1996 00:00:00 +0000
From: davis@space.mit.edu (John E. Davis)
References: <slrn4oeo1s.cb8.gallto@amy.apana.org.au> <slrn4ofevg.vs.leitner@xorn.prz.tu-berlin.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
X-Deja-AN: 152647308
Organization: Center for Space Research
Reply-to: davis@space.mit.edu
Newsgroups: news.software.readers