Message31
Jitterbug-Id: 102
Submitted-By: "=?iso-8859-2?B?VmxhZGlt7XIgQmVuZbk=?=" <Vladimir.Benes@pvt.cz>
Date: Mon, 11 Oct 1999 13:00:07 +0200
Version: None
OS: None
Good afternoon,
I have found a bug on Python 1.5.2. This bug doesn't occur on Python
1.5.1.
Python versions and OS:
- Python 1.5.1. at Debian GNU/Linux 2.0.36
- Python 1.5.2. at Debian GNU/Linux 2.2.9
Bug: Incorrect signal processing (Python 1.5.2).
Process can assign procedure for signal processing. When process is
waiting at system call and this signal occur, then the signal assigned
procedure is otherwise correctly completed but then waiting at system call
is broken and process continues.
Here is a simple program for demonstrate this bug:
#!/usr/bin/python
import signal
import sys
def signal_handle(signum, frame) :
signal.signal(signal.SIGALRM, signal_handle)
signal.alarm(2)
print "signal"
signal_handle(0,0)
a=sys.stdin.readline()
print "Line examined..."
b=sys.stdin.readline()
print "Line examined..."
print a,b,"end"
# end of example
Correct behaviour: Message "Line examined..." occurs only after pressing
ENTER by user.
Bug: Message "Line examined..." occurs immediately after signal occured
and procedure signal_handle finished. Output then look thus (when no input
entered):
signal
signal
Line examined...
signal
Line examined...
end
This bug appears at any signal occur and whatever process waiting at
system call. Some system call even produces exception (e.g. waiting for data
or connection on socket).
Bug is perhaps caused by wrong seting "siginterrupt" on module signal. I
haven't found any way how call in Python program "siginterrupt" for correct
behavior of signal processing.
Good bye, V. Benes
****************************************************************************
Ing. Vladimir Benes, pvt.net
PVT, a.s., OZ Chomutov
e-mail: vladimir.benes@pvt.cz, vladimir.benes@sms.paegas.cz
****************************************************************************
====================================================================
Audit trail:
Mon Oct 11 18:12:13 1999 guido moved from incoming to open |
|
Date |
User |
Action |
Args |
2007-08-23 13:49:03 | admin | link | issue210599 messages |
2007-08-23 13:49:03 | admin | create | |
|