1

I run scripts that take hours to complete in the background using nohup, so that they continue to run after I disconnect. For example nohup julia myscript.jl &> logfile.txt &. This works fine when I'm connected to the compute server over plain ssh. But if I do this when connected using VSCode RemoteSSH extension, the julia process dies soon after I close VSCode.

How can I put a process in the background from VSCode RemoteSSH terminal, so that it keeps running in the background even after I close VSCode?

Boyan
  • 11
  • 1

1 Answers1

0

julia myscript.jl &> logfile.txt & disown $!

Many apps don't respect nohup, so you can use disown instead. The $! syntax is a special variable that represents PID of last executed command.

uuirs
  • 1