Jump to content

batch job dies upon logout


Recommended Posts

Hi, I have a f77 program that I want to run. I log into my workstation from home

via ssh and run the executable by

 

./a.out > runspecs &

 

the job then begins to run but when I log out and log back in the job has died (yes

I have tried running the job at the terminal and all is fine...).

 

the file redirection captures output that is normally printed to the screen.

 

Any ideas?

 

I am running mandrake 10.0 official kernel 2.6.3-7

 

Thanks,

R Haynes

Link to comment
Share on other sites

Try making a very simple F77 program that has no complexity, maybe opens a file, writes a date/time stamp, closes the file over and over until the process quits. Then see if your logout interupts this or not. If not, it tells you something specific to your first program, if not, its something else. May have to work on the process of elimination in this kind of problem. How about if you run it as root? Does it interrupt if you log out?

Link to comment
Share on other sites

Also, now that I'm thinking about it, your ID is a process. you login and are a process. So if you create a process that runs under your process, then you are killing your top process when you log out. Why should your subprocess continue to run? Not because its in the background (still under your login process). I'm not 100% about this though.. is there a process you can attach this F77 process too to keep it running (a daemon)? I'm not really savvy here, anyone have any ideas?

Link to comment
Share on other sites

Also, now that I'm thinking about it, your ID is a process. you login and are a process. So if you create a process that runs under your process, then you are killing your top process when you log out. Why should your subprocess continue to run? Not because its in the background (still under your login process). I'm not 100% about this though..  is there a process you can attach this F77 process too to keep it running (a daemon)? I'm not really savvy here, anyone have any ideas?

 

 

Yep you need to make the process owned by a process which doesn't belong to a GUI process.

steve demionstrates the easy way to do this....

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...