]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Add timeouts to dummy socket servers
authorAndrew Lewis <nerf@judo.za.org>
Fri, 19 May 2017 11:07:21 +0000 (13:07 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Fri, 19 May 2017 11:07:21 +0000 (13:07 +0200)
test/functional/util/dummy_clam.py
test/functional/util/dummy_fprot.py

index 8ef6ef47632979f529aec6fc988a1984580c95f3..6be20de573ec49030f808e198ce098f089674be4 100755 (executable)
@@ -8,6 +8,7 @@ try:
     import SocketServer as socketserver
 except:
     import socketserver
+import signal
 
 class MyTCPHandler(socketserver.BaseRequestHandler):
 
@@ -24,6 +25,7 @@ if __name__ == "__main__":
     pid = os.fork()
     if pid > 0:
         sys.exit(0)
+    signal.alarm(5)
 
     HOST = "localhost"
 
index 64e086241c67e29f196392ca2120518f23c545a1..082934f4d371a5aee0f1f02702e3092cdd8b8c40 100755 (executable)
@@ -8,6 +8,7 @@ try:
     import SocketServer as socketserver
 except:
     import socketserver
+import signal
 
 class MyTCPHandler(socketserver.BaseRequestHandler):
 
@@ -24,6 +25,7 @@ if __name__ == "__main__":
     pid = os.fork()
     if pid > 0:
         sys.exit(0)
+    signal.alarm(5)
 
     HOST = "localhost"