Skip to content

Commit a39f814

Browse files
committed
Revert "Revert "Instead of passing exitcode, exit with 1.""
This reverts commit fd909da. Revert the revert. I must have remembered it wrong.
1 parent fd909da commit a39f814

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ng.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@
9696
#define CHUNKTYPE_EXIT 'X'
9797
#define CHUNKTYPE_STARTINPUT 'S'
9898

99+
// jruby-launcher specific constant
100+
#define JRUBY_EXIT_EXCEPTION (1)
101+
99102
/*
100103
the following is required to compile for hp-ux
101104
originally posted at http://jira.codehaus.org/browse/JRUBY-2346
@@ -324,6 +327,9 @@ void processExit(char *buf, unsigned long len) {
324327
buf[bytesRead] = 0;
325328

326329
exitcode = atoi(buf);
330+
if (exitcode != 0) {
331+
exitcode = JRUBY_EXIT_EXCEPTION;
332+
}
327333

328334
cleanUpAndExit(exitcode);
329335
}

0 commit comments

Comments
 (0)