PuTTy background processing executing IDL scripts

568 views Asked by At

I'd like to start an extensive IDL process which will be run on a linux based server.

Given a normal a procedure like this:

  • open PuTTy
  • move to right directory
  • compile IDL scripts (1 main script executing 2 others)
  • run main script.

Now I would like to do that in the background. After some Google research I found out that it is adivisable to use the nohup-command. But I don't know what this command should look like including my scripts....

Thanks for your help.

2

There are 2 answers

0
ROHIT SHUKLA On

nohup command can be used to run any job in background which you run in foreground. The syntax for it is : nohup your_script &

You can use the fg to bring this job to foreground.

2
rr- On

To detach your current process you can use two solutions:

nohup

Run:

  1. nohup ./process </dev/null &>log.txt &
  2. disown to detach the process from your pseudo-TTY, so that when you exit, the process doesn't terminate.

screen

With nohup you lose all control over the process and all you can do is to kill it. It might be a better idea to use screen which lets you gain access to the detached "TTY" again:

  1. Run screen; screen will spawn a new shell.
  2. Run ./process normally
  3. Now hit Ctrl+A and then D - you will get back to your parent shell
  4. You can logout now
  5. After you login again, you can view the task again with screen -r