Message219376
And a test case for smtplib:
import threading
import signal
import os
import smtplib
def go():
running = True
pid = os.getpid()
def killer():
while running:
os.kill(pid, signal.SIGINT)
signal.signal(signal.SIGINT, lambda x,y: None)
thread = threading.Thread(target=killer)
thread.start()
while 1:
try:
smtplib.SMTP('localhost')
except Exception, ex:
running = False
raise
if __name__ == '__main__':
go()
Fails with:
socket.error: [Errno 4] Interrupted system call |
|
Date |
User |
Action |
Args |
2014-05-30 01:37:47 | tholzer | set | recipients:
+ tholzer, gregory.p.smith, pitrou, vstinner, flox, neologix, meishao |
2014-05-30 01:37:46 | tholzer | set | messageid: <1401413866.74.0.422427254484.issue20611@psf.upfronthosting.co.za> |
2014-05-30 01:37:46 | tholzer | link | issue20611 messages |
2014-05-30 01:37:45 | tholzer | create | |
|