This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author neologix
Recipients Arfrever, neologix, pitrou, vstinner
Date 2011-03-31.14:25:56
SpamBayes Score 2.1592193e-06
Marked as misclassified No
Message-id <>
> There is something interesting in this output: the test uses a subprocess and we only have the traceback of the parent. It may be nice to have the trace of the child process. It might be possible by sending a signal to the child process (but how can we get the list of the child processes in a C signal handler?).

I don't think you can find that, but you could send a signal to the whole process group:
if (getpgrp() == getpid()) {
    kill(-getpgrp(), <signal>);

The getpgrp() == getpid() makes sure that you'll only do that if the current process is the group leader (and it's async-safe). You'll probably want to block <signal> in the parent's handler first.
Note that it won't work if your child process calls setsid(), of course (start_new_session argument to Popen).
Date User Action Args
2011-03-31 14:25:57neologixsetrecipients: + neologix, pitrou, vstinner, Arfrever
2011-03-31 14:25:57neologixsetmessageid: <>
2011-03-31 14:25:56neologixlinkissue11727 messages
2011-03-31 14:25:56neologixcreate