This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author phr
Recipients
Date 2003-02-13.10:11:27
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
import signal
def handle(a,b):
   print "received signal"
signal.signal(signal.SIGALRM, handle)
signal.alarm(5)
name = raw_input('Please enter your name within 5
seconds: ')


waits for input forever instead of getting the signal
thrown
after 5 seconds.  If you wait more than 5 seconds before
typing your name, the signal does get handled after you
finally enter your input.

The workaround of calling sys.stdin.readline() instead of
raw_input does the right thing, so something is funny about
the raw_input function.
History
Date User Action Args
2007-08-23 14:11:01adminlinkissue685846 messages
2007-08-23 14:11:01admincreate