Message139218
| Author |
vstinner |
| Recipients |
giampaolo.rodola, python-dev, rosslagerwall, vstinner |
| Date |
2011年06月26日.20:50:09 |
| SpamBayes Score |
3.7482266e-09 |
| Marked as misclassified |
No |
| Message-id |
<1309121409.97.0.00261398089512.issue12303@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> @Victor, you've had some experience with fixing signals
> on the FreeBSD 6 buildbot...
It's not exactly that I had some experience, it's just that I have a SSH access to the buildbot.
The following code hangs for (exactly?) 30 seconds on sigwaitinfo():
----
import os, signal, threading
s = signal.SIGALRM
signal.pthread_sigmask(signal.SIG_BLOCK, [s])
os.kill(os.getpid(), s)
signal.sigwaitinfo([s])
signal.pthread_sigmask(signal.SIG_UNBLOCK, [s])
----
sigwait() and sigtimedwait() wait also 30 seconds.
The following code only hangs for 1 second using sigwait(), sigwaitinfo() or sigtimedwait():
----
import os, signal, threading
s = signal.SIGALRM
signal.pthread_sigmask(signal.SIG_BLOCK, [s])
os.kill(os.getpid(), s)
signal.sigwaitinfo([s])
signal.pthread_sigmask(signal.SIG_UNBLOCK, [s])
----
test_sigtimedwait_poll() should be skipped on FreeBSD 6, there is a bug in the OS.
test_sigwaitinfo_interrupted() fails because SIGALRM signal handler is called, and the default FreeBSD handler stops the process. You should install a dummy signal handler (e.g. lambda signum, frame: None) for SIGALRM. I don't understand why the test doesn't fail on Linux, the default handler of SIGALRM on Linux stops also the process. |
|