How to run a process and completely detach it of its parent shell

Posted by Bicou on Super User See other posts from Super User or by Bicou
Published on 2011-11-17T16:36:03Z Indexed on 2011/11/17 17:56 UTC
Read the original article Hit count: 206

Filed under:
|
|

I'm running a program on a linux server that will take days to complete.

I'm launching it from my workstation from an SSH terminal, as this program is command-line only.

I want to be able to do all of these :

  • launch that program,
  • redirect standard outputs to files,
  • exit my SSH session without making this terminate the process.

I thought about $ ./MyProg.csh -params -foo -bar </dev/null 1>~/out.log 2>~/err.log &

However, the process is terminated the moment I close my SSH session. My workstation is running Windows XP, and I cannot guarantee its uptime over several days, which is required for the processing of my data on the Linux server.

As you may have noted, my program requires to be launched from CSH.

Is it possible to do this ?

Thanks.

© Super User or respective owner

Related posts about ssh

Related posts about process