Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Provide mechanism for the client to exit with appropriate status code #5

Closed
BanzaiMan opened this issue Dec 31, 2012 · 3 comments
Closed

Comments

@BanzaiMan
Copy link

Currently, when the client sends the task to the server that throws an exception, the client process exits with 131 no matter what the actual status code should be.

Using JRuby (which uses basically the stock ng.c in nailgun-client) as an example, the steps to reproduce this behavior is as follows:

$ jruby --ng-server &                    
[1] 34927
$ NGServer started on all interfaces, port 2113.

$ jruby --ng -e 'at_exit do; exit 1; end'
org.jruby.exceptions.RaiseException: (SystemExit) exit
$ echo $?
131

JRuby sets the status code to 1 in this case, but nailgun is overwriting it with 899, which gets truncated to 131 as an int.

It would be great if there is a way to pass the appropriate status code from the server to the client.

This issue was reported as http://bugs.jruby.org/7031. I have a temporary candidate fix to overwrite the client's status code to 1; this is not ideal, since it adds a maintenance overhead and makes the nailgun update slightly more tedious.

@martylamb
Copy link
Contributor

Sorry I dropped the ball on this; I will look into it shortly.

@gsps
Copy link

gsps commented Feb 3, 2014

Any update on this yet?

@sbalabanov-zz
Copy link
Contributor

Closing all issues older than 6 months; please reopen if it is still relevant

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants