nohup and ksh
Jim Jagielski
jim at jagubox.gsfc.nasa.gov
Tue Nov 27 00:49:49 AEST 1990
In article <36130 at cup.portal.com> thad at cup.portal.com (Thad P Floryan) writes:
>jim at jagubox.gsfc.nasa.gov (Jim Jagielski) in <3955 at dftsrv.gsfc.nasa.gov>
>writes:
>
> I use the Korn shell (ksh) all the time. I like it alot. However, as
> you other "Korners" out there may know, nohup does NOT like ksh and
> will kill your background process if you log off even if you proceed
> it with "nohup".
>
>Not one to defend software I didn't write, I was incredulous at Jim's comment
>(above); I simply didn't believe it. And I still don't.
believe it... see below.
>
>Did you remember to append an "&" on the command line per the following
>example (you MUST have, else why the comment "background process"?):
>
> ksh> nophup command &
>
Actually, the effect of "stopping" the background process has been removed
(as far as I can tell) from A/UX 2.0. nohup on 1.1 (and 1.1.1 I guess) did
NOT trap the HUP signal for ksh so if you were running something in the back-
ground under ksh and logged off, the background process WOULD die when it
received the HUP signal... This WAS documented in the manuals. As I understand
csh (I don't use it), the & automatically traps HUP and makes the process nice.
As far as 2.0 is concerned, it looks like nohup just doesn't know how to
use ksh-specific features... for example "nohup alias &" will crash and burn.
If the command is not ksh-specific (like ls or whatever) then it'll work fine.
It may also work this way with csh, but I don't use it and don't know...
The man page for nohup does state that it's only works with sh and csh.
--
=======================================================================
#include <std/disclaimer.h>
=:^)
Jim Jagielski NASA/GSFC, Code 711.1
jim at jagubox.gsfc.nasa.gov Greenbelt, MD 20771
"Kilimanjaro is a pretty tricky climb. Most of it's up, until you reach
the very, very top, and then it tends to slope away rather sharply."
More information about the Comp.unix.aux
mailing list