diff options
Diffstat (limited to 'test/functional/util/dummy_fprot.py')
-rwxr-xr-x | test/functional/util/dummy_fprot.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/functional/util/dummy_fprot.py b/test/functional/util/dummy_fprot.py index 01e7e578b..64e086241 100755 --- a/test/functional/util/dummy_fprot.py +++ b/test/functional/util/dummy_fprot.py @@ -1,5 +1,7 @@ #!/usr/bin/env python +PID = "/tmp/dummy_fprot.pid" + import os import sys try: @@ -10,6 +12,7 @@ except: class MyTCPHandler(socketserver.BaseRequestHandler): def handle(self): + os.remove(PID) self.data = self.request.recv(1024).strip() if self.server.foundvirus: self.request.sendall(b"1 <infected: EICAR_Test_File> FOO\n") @@ -40,6 +43,7 @@ if __name__ == "__main__": server.foundvirus = foundvirus server.server_bind() server.server_activate() + open(PID, 'w').close() server.handle_request() server.server_close() os.exit(0) |