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

Undocumented exit code MAX_INT-1 #134

Open
almson opened this issue Nov 1, 2021 · 0 comments
Open

Undocumented exit code MAX_INT-1 #134

almson opened this issue Nov 1, 2021 · 0 comments

Comments

@almson
Copy link

almson commented Nov 1, 2021

I've noticed that when my Kubernetes pod shuts down, child processes often die with exit code 2147483646 ie MAX_INT-1, which they did not do under commons-exec. (Commons-exec would sometimes return its own INVALID_EXITVALUE in this case.) I couldn't find this code documented.

Moreover, there is a bit of a discrepancy in the docs. waitFor says it will return Integer.MIN_VALUE if the timeout is reached while NuProcessHandler.onExit returns A value of Integer.MIN_VALUE indicates some kind of launch failure. A value of Integer.MAX_VALUE indicates an unknown or expected failure mode.

It would great be to have better clarity on possible exit codes and when they should be expected.

I should say that a Java library should try to communicate exceptional conditions with exceptions (or return an object with properties), and not by overloading the exit code which the command itself might return.

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