-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests: fix conflict between Cygwin/msys and Windows PIDs #5188
Conversation
TODO: I guess |
ab911df
to
dee3288
Compare
According to some sources a Windows pid can be anything within 32bit... |
Yes, Windows PIDs can be anything, but Cygwin/msys PIDs are generated below 65536 at the moment. So offsetting Windows PIDs by 65536 to have separate "namespaces" will work until they are generated below MAX_INT-65536. Actually I have seen exactly that stackoverflow question, too. I was initially thinking about using negative values for native Windows PIDs, but that would require investigation of changes to some 500 LoCs in the Perl scripts. |
6a0672f
to
38d018e
Compare
Add 65536 to Windows PIDs to allow Windows specific treatment. 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 curl#5178
Since the Windows versions of both programs would write Windows PIDs to their pidfiles which we cannot handle, we need to use our known perl.exe Cygwin/msys PID together with exec() in order to tie the spawned processes to the existance of our perl.exe The perl.exe that is executing secureserver.pl and sshserver.pl has a Cygwin/msys PID, because it is started inside Cygwin/msys.
38d018e
to
055b7b2
Compare
Since the Windows versions of both programs would write Windows PIDs to their pidfiles which we cannot handle, we need to use our known perl.exe Cygwin/msys PID together with exec() in order to tie the spawned processes to the existance of our perl.exe The perl.exe that is executing secureserver.pl and sshserver.pl has a Cygwin/msys PID, because it is started inside Cygwin/msys. Related to #5188
Avoid potential overflow of huge PIDs on Windows. Related to #5188 Assisted-by: Marcel Raad
Add 65536 to Windows PIDs to allow Windows specific treatment in POSIX Perl based test suite.
See also:
Replaces #5178
This will hopefully fix the random issues encountered with Windows CI builds as described in #5034.