Re: subprocess and PPID

2008-11-06 Thread [EMAIL PROTECTED]
On Nov 6, 3:09 pm, Lawrence D'Oliveiro <[EMAIL PROTECTED] central.gen.new_zealand> wrote: > In message <[EMAIL PROTECTED]>, Michele Petrazzo wrote: > > > Lawrence D'Oliveiro wrote: > > >> See the prctl(2) man page. > > > Just seen. It can be, bust since I cannot modify the child process and > > thi

Re: subprocess and PPID

2008-11-06 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Michele Petrazzo wrote: > Lawrence D'Oliveiro wrote: > >> See the prctl(2) man page. > > Just seen. It can be, bust since I cannot modify the child process and > this syscall must be called from the child, I cannot use it. You do the fork and then the exec, right?

Re: subprocess and PPID

2008-11-06 Thread Michele Petrazzo
[EMAIL PROTECTED] wrote: It's possible in linux and with subprocess? AFAIK, there is no easy way to do this. If the parent python process is doing a controlled exit, just kill the child via close() on Popen() handle. Like I do ;) If the parent is doing a uncontrolled exit (say via a SIGKI

Re: subprocess and PPID

2008-11-06 Thread Michele Petrazzo
Lawrence D'Oliveiro wrote: In message <[EMAIL PROTECTED]>, Michele Petrazzo wrote: I have a code that execute into a "Popen" a command (ssh). I need that, if the python process die, the parent pid (PPID) of the child don't become 1 (like I can seen on /proc/$pid$/status ), but it has to die, fo

Re: subprocess and PPID

2008-11-05 Thread Michele Petrazzo
Jorgen Grahn wrote: On Wed, 5 Nov 2008 08:19:34 -0800 (PST), [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: On Nov 5, 5:12 pm, Michele Petrazzo <[EMAIL PROTECTED]> wrote: Hi all, I believe that this is a *nix question, but since I'm developing in python, I'm here. I have a code that execute into

Re: subprocess and PPID

2008-11-05 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Michele Petrazzo wrote: > I have a code that execute into a "Popen" a command (ssh). I need that, > if the python process die, the parent pid (PPID) of the child don't > become 1 (like I can seen on /proc/$pid$/status ), but it has to die, > following it's parent >

Re: subprocess and PPID

2008-11-05 Thread Jorgen Grahn
On Wed, 5 Nov 2008 08:19:34 -0800 (PST), [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > On Nov 5, 5:12 pm, Michele Petrazzo <[EMAIL PROTECTED]> > wrote: >> Hi all, >> I believe that this is a *nix question, but since I'm developing in >> python, I'm here. >> >> I have a code that execute into a "P

Re: subprocess and PPID

2008-11-05 Thread [EMAIL PROTECTED]
On Nov 5, 5:12 pm, Michele Petrazzo <[EMAIL PROTECTED]> wrote: > Hi all, > I believe that this is a *nix question, but since I'm developing in > python, I'm here. > > I have a code that execute into a "Popen" a command (ssh). I need that, > if the python process die, the parent pid (PPID) of the ch

subprocess and PPID

2008-11-05 Thread Michele Petrazzo
Hi all, I believe that this is a *nix question, but since I'm developing in python, I'm here. I have a code that execute into a "Popen" a command (ssh). I need that, if the python process die, the parent pid (PPID) of the child don't become 1 (like I can seen on /proc/$pid$/status ), but it has t