Debian bug report logs - #1297
nohup doesn't seem to work

Package: shellutils; Reported by: Raul Miller <rdm@tad.micro.umn.edu>; 62 days old.

Message received at debian-bugs:


From pixar.com!bruce Sat Sep  2 22:53:44 1995
Return-Path: <bruce@pixar.com>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0sp800-000EuGC; Sat, 2 Sep 95 22:53 PDT
Received: from mongo.pixar.com by pixar.com with SMTP id AA05183
  (5.67b/IDA-1.5 for bruce@mongo.pixar.com); Sat, 2 Sep 1995 22:53:32 -0700
Received: by mongo.pixar.com (Smail3.1.28.1 #15)
	id m0sp7zv-000Et0C; Sat, 2 Sep 95 22:53 PDT
Message-Id: <m0sp7zv-000Et0C@mongo.pixar.com>
To: Raul Miller <moth@magenta.com>
Cc: bruce@Pixar.com, debian-bugs@Pixar.com
Subject: Re: Bug#1297: nohup doesn't seem to work 
In-Reply-To: Your message of "Sat, 02 Sep 1995 23:55:22 PDT."
             <199509030355.XAA20235@magenta.com> 
Date: Sat, 02 Sep 1995 22:53:39 -0700
From: Bruce Perens <bruce@Pixar.com>

I'm going to close this bug, as it doesn't seem to be a nohup problem.

You might play around with "stty -hup", though I don't know if that will
work.
		Bruce

Acknowledgement sent to Bruce Perens <bruce@Pixar.com>:
Extra info received and forwarded. Full text available.
Information forwarded to debian-devel@pixar.com:
Bug#1297; Package shellutils. Full text available.

Message received at debian-bugs:


From magenta.com!moth Sat Sep  2 21:00:21 1995
Return-Path: <moth@magenta.com>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0sp6EG-000Bz5C; Sat, 2 Sep 95 21:00 PDT
Received: from magenta.com by pixar.com with SMTP id AA00596
  (5.67b/IDA-1.5 for bruce@mongo.pixar.com); Sat, 2 Sep 1995 21:00:08 -0700
Received: (moth@localhost) by magenta.com (8.6.12/8.6.4) id XAA20235; Sat, 2 Sep 1995 23:55:22 -0400
Date: Sat, 2 Sep 1995 23:55:22 -0400
Message-Id: <199509030355.XAA20235@magenta.com>
From: Raul Miller <moth@magenta.com>
Reply-To: Raul Miller <moth@magenta.com>
To: bruce@Pixar.com
Cc: debian-bugs@Pixar.com
In-Reply-To: <m0solyG-000EppC@mongo.pixar.com> (message from Bruce Perens on Fri, 01 Sep 1995 23:22:27 -0700)
Subject: Re: Bug#1297: nohup doesn't seem to work

   I think this is a red herring. The signal won't get raised if the
   handler is set to SIG_IGN. Moreover, when I run the simple test
   below, nohup works correctly. I still suspect something else is
   getting to the SIGHUP handler in the test you are running.

[test deleted.]

Ok, perhaps I've completely misdiagnosed what's going on.

Here's my situation: I'm trying to run xdos (from dosemu) as root.
[suid root doesn't work for some features.]  So, I need to respond to
the su prompt before I am able to fire up xdos.  However, using the
"obvious method" of firing up an rxvt (or, if I remember right, an
xterm) to run the su has the problem that when the rxvt (or xterm)
exits it kills the dos window.  nohup won't solve this problem.

>From earlier attempts at getting telnet to do rsh like things under X,
and from some tests I did before submitting this bug report, I believe
that this phenomena is independent of the program I'm running from
inside su.  It's also independent of su -- sh -c exhibits the same
symptoms as su -c.

Unfortunately, I'm not going to have access to the machine that has X
installed till tuesday, so I can't run any further tests at this time.

-- 
Raul

Acknowledgement sent to Raul Miller <moth@magenta.com>:
Extra info received and forwarded. Full text available.
Information forwarded to debian-devel@pixar.com:
Bug#1297; Package shellutils. Full text available.

Message received at debian-bugs:


From pixar.com!bruce Fri Sep  1 23:23:44 1995
Return-Path: <bruce@pixar.com>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0solzU-000EqMC; Fri, 1 Sep 95 23:23 PDT
Received: from mongo.pixar.com by pixar.com with SMTP id AA10520
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Fri, 1 Sep 1995 23:23:33 -0700
Received: by mongo.pixar.com (Smail3.1.28.1 #15)
	id m0solyG-000EppC; Fri, 1 Sep 95 23:22 PDT
Message-Id: <m0solyG-000EppC@mongo.pixar.com>
To: Raul Miller <moth@magenta.com>, debian-bugs@Pixar.com
Cc: bruce@Pixar.com
Subject: Re: Bug#1297: nohup doesn't seem to work 
In-Reply-To: Your message of "Fri, 01 Sep 1995 18:57:36 PDT."
             <199509012257.SAA00237@magenta.com> 
Date: Fri, 01 Sep 1995 23:22:27 -0700
From: Bruce Perens <bruce@Pixar.com>

From: Raul Miller <moth@magenta.com>
> Unlike BSD systems, signals under Linux are reset to their
> default behavior when raised.

I think this is a red herring. The signal won't get raised if the handler
is set to SIG_IGN. Moreover, when I run the simple test below, nohup works
correctly. I still suspect something else is getting to the SIGHUP handler
in the test you are running.

	Thanks

	Bruce

Script started on Fri Sep  1 23:17:33 1995
> bash
bash$ sleep 100 &
[1] 1268
bash$ kill -HUP 1268
bash$ 
[1]+  Hangup                  sleep 100
bash$ nohup sleep 100 &
[1] 1269
bash$ nohup: appending output to `nohup.out'
ps
  PID TTY STAT  TIME COMMAND
  135 v01 S     0:01 -tcsh
  136 v02 S     0:01 -tcsh
 1201 v02 T     0:00 ftp mongo
 1259 v02 S     0:00 script
 1260 v02 S     0:00 script
 1261 pp2 S     0:00 -h -i
 1265 pp2 S     0:00 bash
 1269 pp2 S N   0:00 sleep 100
 1274 pp2 R     0:00 ps
bash$ kill -HUP 1269
bash$ kill -HUP 1269
bash$ kill -HUP 1269
bash$ ps
  PID TTY STAT  TIME COMMAND
  135 v01 S     0:01 -tcsh
  136 v02 S     0:01 -tcsh
 1201 v02 T     0:00 ftp mongo
 1259 v02 S     0:00 script
 1260 v02 S     0:00 script
 1261 pp2 S     0:00 -h -i
 1265 pp2 S     0:00 bash
 1269 pp2 S N   0:00 sleep 100
 1275 pp2 R     0:00 ps
bash$ exit
exit
> exit
exit

Script done on Fri Sep  1 23:18:25 1995

Acknowledgement sent to Bruce Perens <bruce@Pixar.com>:
Extra info received and forwarded. Full text available.
Information forwarded to debian-devel@pixar.com:
Bug#1297; Package shellutils. Full text available.

Message received at debian-bugs:


From magenta.com!moth Fri Sep  1 16:03:43 1995
Return-Path: <moth@magenta.com>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0sof7f-000EAvC; Fri, 1 Sep 95 16:03 PDT
Received: from magenta.com by pixar.com with SMTP id AA19134
  (5.67b/IDA-1.5 for bruce@mongo.pixar.com); Fri, 1 Sep 1995 16:03:30 -0700
Received: (moth@localhost) by magenta.com (8.6.12/8.6.4) id SAA00237; Fri, 1 Sep 1995 18:57:36 -0400
Date: Fri, 1 Sep 1995 18:57:36 -0400
Message-Id: <199509012257.SAA00237@magenta.com>
From: Raul Miller <moth@magenta.com>
Reply-To: Raul Miller <moth@magenta.com>
To: bruce@Pixar.com
Cc: debian-bugs@Pixar.com
In-Reply-To: <m0snwkR-000BgVC@mongo.pixar.com> (message from Bruce Perens on Wed, 30 Aug 1995 16:40:47 -0700)
Subject: Re: Bug#1297: nohup doesn't seem to work

   You aren't registering a handler for SIGHUP, are you? That will invalidate
   the action of "nohup".

That makes a certain amount of sense.  Hmm, let me check the code for
nohup... 

Ok, you're right in that nohup installs a signal handler then execs
the desired program.  However, this is a problem under linux.
According to the man page:

       Unlike BSD systems, signals under Linux are reset to their
       default behavior when raised.

In the case I reported, I'd guess that more than one SIGHUP is being
delivered to the program allegedly protected by nohup.  Basically,
this means that it's difficult to come up with a system which pops up
a temporary window to prompt for a password to use in running some
other program.

-- 
Raul

Acknowledgement sent to Raul Miller <moth@magenta.com>:
Extra info received and forwarded. Full text available.
Information forwarded to debian-devel@pixar.com:
Bug#1297; Package shellutils. Full text available.

Message received at debian-bugs:


From pixar.com!bruce Wed Aug 30 16:40:49 1995
Return-Path: <bruce@pixar.com>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0snwkS-000EFQC; Wed, 30 Aug 95 16:40 PDT
Received: from mongo.pixar.com by pixar.com with SMTP id AA00111
  (5.67b/IDA-1.5 for bruce@mongo.pixar.com); Wed, 30 Aug 1995 16:40:38 -0700
Received: by mongo.pixar.com (Smail3.1.28.1 #15)
	id m0snwkR-000BgVC; Wed, 30 Aug 95 16:40 PDT
Message-Id: <m0snwkR-000BgVC@mongo.pixar.com>
X-Mailer: exmh version 1.6.2 7/18/95
To: Raul Miller <rdm@tad.micro.umn.edu>, debian-bugs@Pixar.com
Cc: bruce@Pixar.com
Subject: Re: Bug#1297: nohup doesn't seem to work 
In-Reply-To: Your message of "Wed, 30 Aug 1995 18:47:00 PDT."
             <m0snvvG-0006igC@rdm.legislate.com> 
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Date: Wed, 30 Aug 1995 16:40:47 -0700
From: Bruce Perens <bruce@Pixar.com>

You aren't registering a handler for SIGHUP, are you? That will invalidate
the action of "nohup".

	Bruce
--
-- Attention Ham Radio Operators: For information on "Linux for Hams", read
-- the World Wide Web page http://www.hams.com/LinuxForHams, or e-mail to
-- info@hams.com .


Acknowledgement sent to Bruce Perens <bruce@Pixar.com>:
Extra info received and forwarded. Full text available.
Information forwarded to debian-devel@pixar.com:
Bug#1297; Package shellutils. Full text available.

Message received at debian-bugs:


From tad.micro.umn.edu!rdm Wed Aug 30 15:48:14 1995
Return-Path: <rdm@tad.micro.umn.edu>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0snvvZ-0006FtC; Wed, 30 Aug 95 15:48 PDT
Received: from rdm.legislate.com ([192.77.155.13]) by pixar.com with SMTP id AA26108
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Wed, 30 Aug 1995 15:48:00 -0700
Received: by rdm.legislate.com
	id <m0snvvG-0006igC@rdm.legislate.com>
	(Debian /\oo/\ Smail3.1.29.1 #29.33); Wed, 30 Aug 95 18:47 EDT
Message-Id: <m0snvvG-0006igC@rdm.legislate.com>
Date: Wed, 30 Aug 95 18:47 EDT
From: Raul Miller <rdm@tad.micro.umn.edu>
To: debian-bugs@pixar.com
Subject: nohup doesn't seem to work

Package: shellutils
Version: 1.12
Revision: 3        

I can reliably generate a HUP signal in a program run by nohup.  The
general approach is:

rxvt -e sh -c 'nohup testprog & sleep 5'

[The sleep is an arbitrary mechanism to allow the testprog to register
its signal handlers before the HUP is delivered.]

-- 
Raul

Acknowledgement sent to Raul Miller <rdm@tad.micro.umn.edu>:
New bug report received and forwarded. Full text available.
Report forwarded to debian-devel@pixar.com:
Bug#1297; Package shellutils. Full text available.
Ian Jackson / iwj10@thor.cam.ac.uk, with the debian-bugs tracking mechanism
This page last modified 07:43:01 GMT Wed 01 Nov