diff options
author | Marc Hoersken <info@marc-hoersken.de> | 2020-04-05 19:18:09 +0200 |
---|---|---|
committer | Marc Hoersken <info@marc-hoersken.de> | 2020-04-11 23:44:52 +0200 |
commit | 3f60a9e995c851a1dff2439cb16407d86cde7754 (patch) | |
tree | c1c50276226963c95764ed1ed9a795b26b98b708 /tests/dictserver.py | |
parent | 6d13ef532598e4fc54dbf03c1373b0a3c4c597f5 (diff) | |
download | curl-3f60a9e995c851a1dff2439cb16407d86cde7754.tar.gz |
tests: fix conflict between Cygwin/msys and Windows PIDs
Add 65536 to Windows PIDs to allow Windows specific treatment
by having disjunct ranges for Cygwin/msys and Windows PIDs.
See also:
- https://cygwin.com/git/?p=newlib-cygwin.git;a=commit; ↵
h=b5e1003722cb14235c4f166be72c09acdffc62ea
- https://cygwin.com/git/?p=newlib-cygwin.git;a=commit; ↵
h=448cf5aa4b429d5a9cebf92a0da4ab4b5b6d23fe
Replaces #5178
Closes #5188
Diffstat (limited to 'tests/dictserver.py')
-rwxr-xr-x | tests/dictserver.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/dictserver.py b/tests/dictserver.py index 3211318c5..5641692d9 100755 --- a/tests/dictserver.py +++ b/tests/dictserver.py @@ -51,8 +51,11 @@ def dictserver(options): """ if options.pidfile: pid = os.getpid() + # see tests/server/util.c function write_pidfile + if os.name == "nt": + pid += 65536 with open(options.pidfile, "w") as f: - f.write("{0}".format(pid)) + f.write(str(pid)) local_bind = (options.host, options.port) log.info("[DICT] Listening on %s", local_bind) @@ -85,7 +88,11 @@ class DictHandler(socketserver.BaseRequestHandler): if VERIFIED_REQ in data: log.debug("[DICT] Received verification request from test " "framework") - response_data = VERIFIED_RSP.format(pid=os.getpid()) + pid = os.getpid() + # see tests/server/util.c function write_pidfile + if os.name == "nt": + pid += 65536 + response_data = VERIFIED_RSP.format(pid=pid) else: log.debug("[DICT] Received normal request") response_data = "No matches" |