running a python script in the background

Arun Sivakumaran arun.sivakumaran at
Sat Oct 30 10:42:02 CEST 2004

Actually, I am working from a 32-bit linux client and am SSHing to a
64-bit itanium server (not sure what's being run there).

I had tried the nohup option too before, that doesn't seem to help.


On Fri, 29 Oct 2004 23:08:25 -0700, Josiah Carlson <jcarlson at> wrote:
> arun.sivakumaran at (Arun) wrote:
> > the simulations totally in the background (the simulations run for a
> > day or two, so basically I want to start them in background and log
> > off).
> > Now if I start the script in the background with " &", it
> > doesn't work. I figure the reason is the system() call spawns the
> > simulator in the foreground.
> > Is there a way I can make this all run in the background, while at the
> > same time ensuring that only one instance of the simulator is running?
> It sounds like you are running this on *nix.  The Python interpreter is
> likely dying when you log-off due to a 'hangup' signal being called when
> you log out.
> What has worked for me in the past is to SSH to localhost, executing:
> "nohup python &" and disconnecting.  It should work running
> from a local terminal (without SSH), but I can't guarantee it.
>  - Josiah

Arun.Sivakumaran at

More information about the Python-list mailing list