subprocess and PPID

saju.pillai at gmail.com saju.pillai at gmail.com
Thu Nov 6 06:03:22 EST 2008


On Nov 6, 3:09 pm, Lawrence D'Oliveiro <l... at geek-
central.gen.new_zealand> wrote:
> In message <geu8k4$ce... at nnrp-beta.newsland.it>, 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? So do the prctl in-between.

You could also write a wrapper program that does a prctl and then
exec(actual command). Infact you could use a wrapper program to
portably poll for the parent if you dont want to prctl(); invoke this
wrapper from python, the wrapper can then invoke your actual command.

-srp



More information about the Python-list mailing list