Bug#1297: nohup doesn't seem to work
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
Reply to: