[Python-Dev] Testing Socket Timeouts patch 1519025
"Martin v. Löwis"
martin at v.loewis.de
Sun Jul 30 09:42:14 CEST 2006
Tony Nelson schrieb:
> Hmm, OK, darn, thanks. MSWindows does allow users to press Ctl-C to send a
> KeyboardInterrupt, so it's just too bad if I can't find a way to test it
> from a script.
You can use GenerateConsoleCtrlEvent to send Ctrl-C to all processes
that share the console of the calling process.
> BTW, I picked SIGALRM because I could do it all with one thread. Reading
> POSIX, ISTM that if I sent the signal from another thread, it would bounce
> off that thread to the main thread during the call to kill(), at which
> point I got the willies. OTOH, if kill() is more widely available than
> alarm(), I'll give it a try, but going by the docs, I'd say it isn't.
Indeed, alarm should be available on any POSIX system.
Regards,
Martin
More information about the Python-Dev
mailing list