A message for Linux.com registered users: We are in the process of making changes to the Linux forums. Starting Monday, 8/13/18 at 6:00 PM PT, you will be unable to access the forums. They will re-launch as soon as possible on Wednesday, 8/15/18 with new features and improved functionality. Thank you for your patience and stay tuned for the new improved forums.

May 27, 2009

Why my shell script is always "stopped" ?


This is the problem that drives me crazy. I let a script A (a.sh) call script B (b.sh).
I used
nohup a.sh &>/tmp/log &

In script A it calls B directly, without any redirecting or nohup or background.

Script A:

#do nothing but call B
ssh another-machine "/user/tom/b.sh"

Script B:

# do some fancy things, takes about 1 hour to finish

I used
nohup a.sh &>/tmp/log &

It was "stopped" after 5 minutes but B was running and B finished correctly.

Anybody knows why?

BTW, if I don't use nohup and backgrounding, it's OK. i.e. if I use
directly. Everything is OK. I am totally confused.

Click Here!