Skip to content
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

Fix: Exit Codes #15

Merged
merged 3 commits into from
Apr 26, 2022
Merged

Fix: Exit Codes #15

merged 3 commits into from
Apr 26, 2022

Conversation

Meldiron
Copy link
Contributor

@Meldiron Meldiron commented Mar 24, 2022

  • Can run both in parallel, and in serial.

Manual QA:

All working:
CleanShot 2022-03-24 at 14 21 43

All failing:
CleanShot 2022-03-24 at 14 21 47

40% failing:
CleanShot 2022-03-24 at 14 21 51

src/CLI/Console.php Show resolved Hide resolved
src/CLI/Console.php Outdated Show resolved Hide resolved
src/CLI/Console.php Outdated Show resolved Hide resolved
src/CLI/Console.php Outdated Show resolved Hide resolved
Copy link
Contributor

@christyjacob4 christyjacob4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor comments.

Can you also explain / share a link to the exact logic here ?

@Meldiron
Copy link
Contributor Author

Some minor comments.

Can you also explain / share a link to the exact logic here ?

'( ' . $cmd . ' ) 3>/dev/null ; echo $? >&3'

($cmd) executes a command
3 means we are creating a new pipe (stdin, stderr, stdout, OUR NEW ONE)
> forwards output of the command
/dev/null means we don't display output
; indicates a new command
echo $? prints the exit code of the last command
> again, forwards output of the command
&3 makes sure to print output to 3rd pipe

Finally, we get output of 3rd pipe in PHP \stream_set_blocking($pipes[3], false);.

That's how I remember understanding it. The website was a really old forum, can't find it anymore.

@christyjacob4 christyjacob4 merged commit 69e68f8 into master Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants