Python signal delivery under BSD 4.4

Donn Cave donn at drizzle.com
Thu Aug 14 17:39:48 CEST 2003


Quoth Michael Hudson <mwh at python.net>:

| At some point, the threads implementation got changed so that new
| threads get their signal mask set to "block everything and it's cat"
| (there was a reason for this, but I'm not really sure what it was).
| As I see it, you have two options: 1) write a little C to unset the
| procmask after fork() but before execve() 2) only launch apps from the
| main thread.
|
| I did write wrappers for sigprocmask & so on for inclusion in Python
| 2.3, but the x-platform behaviour was insane (and *some* version of
| FreeBSD contains fixes to libc_r that my code provoked, but I'm not
| sure which version) so the code got backed out again.

Since the present case involves os.spawnv, option 1 is probably
feasible.  At worst, he could write a C program that zeroes the
signal mask and execs its args (i.e., an extra execve before
sigprocmask() shouldn't hurt anything.)

Of course Python level access would be better.

	Donn Cave, donn at drizzle.com




More information about the Python-list mailing list