subprocess and PPID

Michele Petrazzo michele.petrazzo at TOGLIunipex.it
Thu Nov 6 03:07:32 EST 2008


Lawrence D'Oliveiro wrote:
> In message <ges2jc$202$1 at nnrp-beta.newsland.it>, 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 It's possible in linux and with
>> subprocess?
> 
> There is a Linux-specific system call that says it does this (haven't
>  tried). 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.

Thanks,
Michele



More information about the Python-list mailing list