Repository navigation
Conversation
There is now a workaround in `system_with_timeout()` to avoid issues with quotes and spaces in the filenames of the executable by using `start`[1]. However, calling `start` will not propagate the process status of the actual process. Thus, calling `proc_get_status()` is pretty meaningless, and especially Microsoft errors cannot be detected (typically, access violations etc.), and as such no "Termsig" message is output. We fix this by executing `exit` after the started command has finished. [1] <https://github.com/php/php-src/blob/a6d7d5234b05582d3a333c0f2646fdeae44b4728/run-tests.php#L1157-L1162>
Member
Author
|
Sorry to bother you, @nielsdos, but you've written that code, and I think fixing the issue (namely that segfaults in tests may go unnoticed on Windows) is pretty important. I'm not sure if the |
ndossche
approved these changes
Sep 1, 2024
ndossche
left a comment
Member
There was a problem hiding this comment.
Seems fine, wasn't aware tbh that this would interfere with the access violations on Windows.
proc_open seems to be the better option but we can delay that.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There is now a workaround in
system_with_timeout()to avoid issues with quotes and spaces in the filenames of the executable by usingstart[1]. However, callingstartwill not propagate the process status of the actual process. Thus, callingproc_get_status()is pretty meaningless, and especially Microsoft errors cannot be detected (typically, access violations etc.), and as such no "Termsig" message is output.We fix this by executing
exitafter the started command has finished.[1]
php-src/run-tests.php
Lines 1157 to 1162 in a6d7d52
Given the
proc_open()escaping fixes that have been done in the meantime, it may also be possible to drop thestartworkaround on Windows altogether; a quick test worked as expected, but I haven't done extensive testing.