Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: nohup dies



Hi,

I have been playing around and found the problem. Let's go step by step...

I tried the vanilla zshrc by just moving my zshrc out of where zsh
looks for it when I start a session.

After having done this, I set nohup and try to launch the simulation
as I have done all the last years:

tuffi3% set nohup
tuffi3% nohup  cat ./inicia| ~pau/executables/NB4_NoPN > diagnostic &
[1] 19492 19493
tuffi3%
tuffi3% exit
zsh: you have running jobs.
tuffi3% exit
zsh: warning: 1 jobs SIGHUPed

This is new: "zsh: warning: 1 jobs SIGHUPed"

But when I log in again, the job is not there anymore

I try again now with nohup before and after the pipe AND set nohup before and
after quitting

tuffi3% set nohup
tuffi3% vim inicia
tuffi3% nohup  cat ./inicia| nohup ~pau/executables/NB4_NoPN > diagnostic &
[1] 19511 19512
tuffi3% set nohup
tuffi3% exit
zsh: you have running jobs.
tuffi3% exit
zsh: warning: 1 jobs SIGHUPed
Connection to tuffi3 closed.


Hurrah! NB4_NoPN is there when I log in again.

Now... what was the problem? My zshrc? nohup before and after the pipe
or set nohup?

let's see... Let's kill the job and restart zsh to make sure set nohup
is not loaded

tuffi3% pkill -9 NB4_NoPN
tuffi3% zsh

Let's try before the two nohups

tuffi3% nohup  cat ./inicia| nohup ~pau/executables/NB4_NoPN > diagnostic &
[1] 19542 19543
tuffi3% exit
zsh: you have running jobs.
tuffi3% exit
zsh: warning: 1 jobs SIGHUPed

I log in again and... the job is there!

Let's try now NO nohup at all and "set nohup"

tuffi3% pkill -9 NB4_NoPN
tuffi3% cat ./inicia| ~pau/executables/NB4_NoPN > diagnostic &
[1] 19553 19554
tuffi3% exit
zsh: you have running jobs.
tuffi3% exit
zsh: warning: 1 jobs SIGHUPed
Connection to tuffi3 closed.

I log in again: The job has died

Now ONE nohup with "set nohup" on

tuffi3% set nohup
tuffi3% nohup  cat ./inicia| ~pau/executables/NB4_NoPN > diagnostic &
[1] 19566 19567
tuffi3% exit
zsh: you have running jobs.
tuffi3% exit
zsh: warning: 1 jobs SIGHUPed
Connection to tuffi3 closed.

I log in again: The job has died

Now just two nohup and "set nohup" off

tuffi3% nohup  cat ./inicia| nohup ~pau/executables/NB4_NoPN > diagnostic &
zsh: you have running jobs.
tuffi3% exit
zsh: warning: 1 jobs SIGHUPed
Connection to tuffi3 closed.

I log in again: The job is there, it has survived

And now the last test: My zshrc + two "nohups"

tuffi3| nohup  cat ./inicia| nohup ~pau/executables/NB4_NoPN > diagnostic &
[1] 19626 19627
tuffi3| exit
zsh: you have running jobs.
tuffi3| exit
zsh: warning: 1 jobs SIGHUPed
fins després, plaerdemavida
Connection to tuffi3 closed.

I log in again: The job is there.


And just out of curiousity: my zshrc and the nohup AFTER the pipe

tuffi3| pkill -9 NB4_NoPN
tuffi3| cat ./inicia| nohup ~pau/executables/NB4_NoPN > diagnostic &
[1] 19652 19653
tuffi3| exit
zsh: you have running jobs.
tuffi3| exit
zsh: warning: 1 jobs SIGHUPed
fins després, plaerdemavida
Connection to tuffi3 closed.

I log in again: The job is there.


Moral of the story:

(1) My zshrc is not the problem
(2) Setting nohup after the pipe fixes it
(3) ksh behaves differently

But, let me insist: In the old cluster, with a former version of zsh, the shell
"understood what I meant" when I set nohup at the beginning of the
whole command, as ksh does

Why doesn't zsh understand it any more?

Thanks

Pau



Messages sorted by: Reverse Date, Date, Thread, Author