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

Wrong exit code #3

Open
ntadej opened this issue Feb 10, 2018 · 1 comment
Open

Wrong exit code #3

ntadej opened this issue Feb 10, 2018 · 1 comment

Comments

@ntadej
Copy link
Contributor

ntadej commented Feb 10, 2018

I'm getting wrong exit code when running in bash from zsh. It's always 0, no matter if I exit or return something else in the function passed to prll.

@exzombie
Copy link
Owner

This is intended. Since jobs can return different values, it is not clear what should be returned from prll itself. You're supposed to look at prll's output where each job's return value is printed. Currently, the return value of prll itself may tell you whether prll was interrupted, but I have not documented this because the exact behaviour depends on the shell used. Compare zsh, which returns 130 on SIGINT, and bash which returns 0.

While there may be value in returning 1 when any job returns a non-zero value, you still need to parse the output to figure out what really happened. So I think implementing this is not worth the hassle. Consider that once a job is backgrounded, it is detached from the shell and can only communicate using the C helpers; maybe implementing return value passing isn't really difficult, but it isn't trivial either.

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

2 participants