[Python-bugs-list] [ python-Bugs-549081 ] test_signal hangs -- signal broken on OpenBSD?
noreply@sourceforge.net
noreply@sourceforge.net
Thu, 31 Oct 2002 02:49:25 -0800
Bugs item #549081, was opened at 2002-04-26 14:54
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=549081&group_id=5470
Category: Installation
Group: Python 2.2.1 candidate
Status: Open
Resolution: None
Priority: 5
Submitted By: Noah Spurrier (noah)
Assigned to: Nobody/Anonymous (nobody)
Summary: test_signal hangs -- signal broken on OpenBSD?
Initial Comment:
This appears to be similar to bug as PR#288,
[ 210635 ] test_signal hangs when running
as part of testall (PR#288)
except that I have this problem on a fresh install of
OpenBSD 3.0 while trying to build Python-2.2.1.
I did a generic build running as root:
./configure
./make
./make test
Yours,
Noah
----------------------------------------------------------------------
>Comment By: Michael Hudson (mwh)
Date: 2002-10-31 10:49
Message:
Logged In: YES
user_id=6656
As far as I am aware (not very) Python signals have always
been broken on OpenBSD. None of the Python core developers
use OpenBSD, though, so it's always remained a mystery.
frallan, does the C equivalent of your Python test work? Do
you have any idea what Python (or OpenBSD, maybe) is doing
wrong?
signals are pain.
----------------------------------------------------------------------
Comment By: Frallan the master Jedi (frallan)
Date: 2002-10-31 09:48
Message:
Logged In: YES
user_id=639616
I get the exact same behavior on OpenBSD 3.1 with Python-
2.2.2. Also this simple test program from the "Python
Standard Library" book - fails. The program terminates but
the "got signal" message is never printed.
import signal
import time
def handler (signo, frame):
print 'got signal', signo
signal.signal(signal.SIGALRM, handler)
# wake me up in two seconds
signal.alarm(2)
now = time.time()
time.sleep(200)
print 'slept for', time.time() - now, "seconds"
----------------------------------------------------------------------
Comment By: Noah Spurrier (noah)
Date: 2002-04-27 16:40
Message:
Logged In: YES
user_id=59261
Below is the output of test_signal.py. I ran it manually. I
modified it slightly to print out the pid; the return
values from the signal calls; and to print a count of the
loop iteration (starting at 1). You can see that after
Count 4 it just sits there. After about a minute I hit Ctrl-
Z. I have uploaded the modified version of test_signal.py.
...
bash-2.05# python test_signal.py
pid: 8606
signal.alarm(20): 0
signal.signal(5, handlerA): 0
signal.signal(2, handlerB): <built-in function
default_int_handler>
signal.signal(3, signal.SIG_IGN): 0
signal.signal(signal.SIGALRM, signal.default_int_handler): 0
starting pause() loop...
+ sleep 2
count: 1
call pause()...
+ kill -5 8606
pause() returned
+ sleep 2
count: 2
call pause()...
+ kill -2 8606
pause() returned
+ sleep 2
count: 3
call pause()...
+ kill -3 8606
pause() returned
count: 4
call pause()...
^Z
[1]+ Stopped python test_signal.py
bash-2.05# ps -p 8606
PID TT STAT TIME COMMAND
8606 p0 T 0:00.09 python test_signal.py
bash-2.05# uname -a
OpenBSD nobot 3.0 GENERIC#94 i386
bash-2.05# python
Python 2.2.1 (#4, Apr 26 2002, 23:06:40)
[GCC 2.95.3 20010125 (prerelease)] on openbsd3
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=549081&group_id=5470