Operating System - HP-UX
1836856 Members
2462 Online
110110 Solutions
New Discussion

Re: Jobs started over SSH die on logout

 
SOLVED
Go to solution
Chris H_3
Advisor

Jobs started over SSH die on logout

Hi all,
I've been trying to read the man pages but must be missing something, just not getting it.

On an HP-UX 11.00 box, there are some scripts we start that link Oracle to some other things. When we come in over Telnet, start the scripts, then log off, there is no problem, but over SSH, when I start the same scripts and log off, the processes die. Is there some tilde escape I need to send? Can someone briefly explain why this happens or point me in the right direction?

Version:
OpenSSH_3.7.1p2-pwexp26, SSH protocols 1.5/2.0, OpenSSL 0.9.7c 30 Sep 2003
HP-UX_Secure_Shell-A.03.71.000, HP_UX Secure Shell version

Thanks!
CH
5 REPLIES 5
Chris Vail
Honored Contributor
Solution

Re: Jobs started over SSH die on logout

Send them over with the nohup command:
ssh DESTHOST "nohup COMMAND &"

Then it doesn't matter if the parent program (whether ssh or anything else) dies: the program will run to completion.

Chris
TwoProc
Honored Contributor

Re: Jobs started over SSH die on logout

Just a thought - even though you may not be using it - make sure you're "just" using ssh and not a Xwindows pipe with it (that is, with a "-X" flag ) with the ssh command.

I'm not saying this is even "probably" you're problem - but I have seen the same problem when then ssh command was started with an "-X" command switch thrown in. What happens is that the sub-command may believe that it needs the Xwindow support to keep running.

We are the people our parents warned us about --Jimmy Buffett
Chris H_3
Advisor

Re: Jobs started over SSH die on logout

A couple of the people that need to get into the server are on Windows PC's, and just come in from a console window using standard telnet or Putty for SSH.

CH
Jeff Schussele
Honored Contributor

Re: Jobs started over SSH die on logout

Hi CH,

I agree with Chris.
The users *must* end their commands with the "&" or they'll die when the parent - their shell in this case - dies.
Furthermore they should also preface the command with nohup just to be sure - i.e.

nohup command parm1 parm2 &

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Chris H_3
Advisor

Re: Jobs started over SSH die on logout

Thanks for the help all, not sure why I didn't think of the '&' myself, duh. But the nohup never occured to me. Even had to give you a point John, that was good info, and anything worth writing down is worth a something!

CH