KeyboardInterrupt should not kill subprocess

Donn Cave donn at
Fri Feb 22 02:25:45 CET 2008

In article <625r3oF21uf4hU1 at>,
 Michael Goerz <newsgroup898sfie at> wrote:

> But as it seems, a keyboard interrupt will automatically pass down to 
> the subprocesses, causing them to abort. Is there a way that I can 
> prevent the subprocesses from being canceled by a keyboard interrupt?

You might try posix.setsid(), from the child fork.

The object is to get the child fork out of the foreground
process group for the Berkeley terminal driver.  This defines
who gets signals, when they originate in terminal control keys.

   Donn Cave, donn at

More information about the Python-list mailing list