summaryrefslogtreecommitdiff
path: root/tests/dictserver.py
diff options
context:
space:
mode:
authorMarc Hoersken <info@marc-hoersken.de>2021-07-16 12:23:03 +0200
committerMarc Hoersken <info@marc-hoersken.de>2021-07-29 08:08:07 +0200
commitc34bd93f60d0dfc128c51cbcde8b7e03dcdfdc6d (patch)
treec54bc9fd498d396029430102ed991714ce3e6020 /tests/dictserver.py
parent4d680e4a8fa578b00bb56ba7e9a7fd2f926b2beb (diff)
downloadcurl-c34bd93f60d0dfc128c51cbcde8b7e03dcdfdc6d.tar.gz
tests/*server.py: remove pidfile on server termination
Avoid pidfile leaking/laying around after server already exited. Reviewed-by: Daniel Stenberg Closes #7506
Diffstat (limited to 'tests/dictserver.py')
-rwxr-xr-xtests/dictserver.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/dictserver.py b/tests/dictserver.py
index 187432849..4ef561376 100755
--- a/tests/dictserver.py
+++ b/tests/dictserver.py
@@ -188,5 +188,8 @@ if __name__ == '__main__':
log.exception(e)
rc = ScriptRC.EXCEPTION
+ if options.pidfile and os.path.isfile(options.pidfile):
+ os.unlink(options.pidfile)
+
log.info("[DICT] Returning %d", rc)
sys.exit(rc)