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

Verboser output of child in case of invalid/unknown command #50

Open
ghost opened this issue Sep 1, 2021 · 2 comments
Open

Verboser output of child in case of invalid/unknown command #50

ghost opened this issue Sep 1, 2021 · 2 comments

Comments

@ghost
Copy link

ghost commented Sep 1, 2021

We are currently validating various libs for a simple process handling in C++ (came from Boost.Process...) and are quite excited about subprocess.h

However, when doing some basic tests we might have found a part of the lib, which could be improved to ease troubleshooting for the user/developer.
E. g. when somebody gives an invalid command (e.g. lss) no further information is given. In contrast, other libs give some hint in the form of execv's perror message or a dedicated error code. In case you are interested i appended you our patch file. With this update it is possible to check the child's stdout/stderr for the error message or simply provide it to the user.

If you have any further questions please feel free to ask.

subprocess.perror.patch.txt

@ghost
Copy link
Author

ghost commented Sep 1, 2021

Updated the patch. Maybe the best approach would be to forward a dedicated error code to the parent?

subprocess.perror.patch.txt

@sheredom
Copy link
Owner

sheredom commented Sep 2, 2021

Hey there! Any chance you've got a dumb test case with the output you get with this patch? I just want to understand what is being reported back to the user with it, so I can guage how to make this work nicer.

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

No branches or pull requests

1 participant