[Tutor] problem with subprocess

Bala subramanian bala.biophysics at gmail.com
Fri Jul 30 16:10:12 CEST 2010

Thank you so much. I could see the job running with nohup after logout.


On Fri, Jul 30, 2010 at 3:49 PM, Hugo Arts <hugo.yoshi at gmail.com> wrote:

> On Fri, Jul 30, 2010 at 2:36 PM, Bala subramanian
> <bala.biophysics at gmail.com> wrote:
> > Dear Friends,
> >
> > I have to do a series of job in a remote machine. I put each job in a
> text
> > file called 'job' as and wrote the following code that can read each line
> in
> > the text file and execute the job.
> >
> Why not just write a shellscript? that's essentially a list of jobs
> anyway. if you make the first line of the file #! /bin/bash you can
> basically execute it directly.
> > I login to the machine and run the script as 'python job.py'. But when i
> > logout from the machine, the job gets killed. So i submitted the job in
> > background as 'python job.py &'. Even in this case, when i logout from
> the
> > machine, the job gets killed. Why is this so. How can i avoid the same ?
> >
> you need to run 'nohup python job.py'. background process still get
> SIGHUP when you log out, so they'll still exit.
> http://www.computerhope.com/unix/unohup.htm
> Hugo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20100730/deb8fd67/attachment.html>

More information about the Tutor mailing list