rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: Tom Culliton <culliton@clark.net>
To: Tim Goodwin <tgoodwin@cygnus.co.uk>
Cc: Tom Culliton <culliton@clark.net>, rc@hawkwind.utcs.toronto.edu
Subject: Re: rc,linux,signal,readline
Date: Wed, 13 Aug 1997 13:57:41 -0400	[thread overview]
Message-ID: <199708131757.NAA29765@clark.net> (raw)
In-Reply-To: Your message of "Wed, 13 Aug 1997 14:33:53 BST." <ZAoAAMG38TPctAEA@nan.cygnus.co.uk>

On Wed, 13 Aug 1997 14:33:53 BST, Tim Goodwin wrote:

> ...and it all seems to work ok.  Specifically, INTs and QUITs work as I
> expect.  Can you let me know what to look for so I can fix it?

OK, testing with 1.5b2 out of the box configured --with-readline,
"make trip" hangs in trip.rc somewhere after line 411.  This is RedHat
4.2, and according to ldd, with the same dynamic libraries as you were
using.  The following sequence shows a problem with catching signals
using readline.

[root@cnslab3 rc-1.5b2]# ./rc
; kill -1 $pid
Hangup

Looks, OK....

[root@cnslab3 rc-1.5b2]#
[root@cnslab3 rc-1.5b2]#
[root@cnslab3 rc-1.5b2]# ./rc
; fn sighup {echo "Got sighup"}
; kill -1 $pid
[root@cnslab3 rc-1.5b2]# ./rc
; fn sighup {echo "Got sighup"}
; kill -1 $pid

Hangs and has to be "kill -9"ed

I went through this at great length a few months back and came up with
a set of patches that do the required clean up after readline.  The
archives should contain the very detailed messages that I sent to the
mailing list describing my discoveries and diagnoses.  In summary,
readline catches certain signals and resets the terminal state,
however there are many more that it doesn't catch, and one (SIGWINCH)
that it handles in a rather odd way.  When you handle one of these
signals within rc instead of exiting, things are left in a bad state.
It's probably to be expected that the place where trip.rc hangs is
while waiting for a subshell to return, i.e. - catching SIGCHLD.  I
will try to adapt the patches to 1.5b2 and forward them to you.


      parent reply	other threads:[~1997-08-13 21:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-08-12  8:19 rc,linux,signal,readline Russell Davies
1997-08-12  9:42 ` rc,linux,signal,readline Tim Goodwin
1997-08-12 13:59 ` rc,linux,signal,readline Tom Culliton
1997-08-12 21:24   ` rc,linux,signal,readline Paul Haahr
1997-08-12 21:55     ` rc,linux,signal,readline Tom Culliton
1997-08-13 13:33       ` rc,linux,signal,readline Tim Goodwin
1997-08-13 14:20         ` rc,linux,signal,readline Tom Culliton
1997-08-13 17:57         ` Tom Culliton [this message]

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=199708131757.NAA29765@clark.net \
    --to=culliton@clark.net \
    --cc=rc@hawkwind.utcs.toronto.edu \
    --cc=tgoodwin@cygnus.co.uk \
    /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).