Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 0.9.8, JRuby 0.9.9, JRuby 1.0.0RC1, JRuby 1.0.0RC2
-
Fix Version/s: JRuby 1.0.0RC3
-
Component/s: None
-
Labels:None
-
Environment:jruby from trunk 16. April, java 1.5.0_11, win xp sp 2
-
Number of attachments :
Description
JRuby seems to give 0 as process exit status even if it wasn't. Try this:
C:\>jruby -e "system('ruby -e \"exit(2)\"');print $?>>8"
0
This is a jruby issue, since
C:\>ruby -e "system('ruby -e \"exit(2)\"');print $?>>8"
2
As a minor detail, jruby seems to be a little smarter when finding stuff to execute:
C:\>ruby -e "system('jruby -e \"exit(2)\"');print $?>>8"
-e:1: undefined method `>>' for nil:NilClass (NoMethodError)
i.e. "jruby" executable could not be found. However:
C:\>ruby -e "system('jruby.bat -e \"exit(2)\"');print $?>>8"
2
And jruby seems to be smart enough to find the .bat file even w/out the suffix:
C:\>jruby -e "system('jruby -e \"exit(2)\"');print $?>>8"
0
Activity
Charles Oliver Nutter
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Fix Version/s | JRuby 1.0.0 [ 13070 ] |
Charles Oliver Nutter
made changes -
| Fix Version/s | JRuby 1.0.0RC1 [ 13070 ] | |
| Fix Version/s | JRuby 1.0.0 [ 13457 ] |
Charles Oliver Nutter
made changes -
| Affects Version/s | JRuby 0.9.9 [ 13280 ] | |
| Fix Version/s | JRuby 1.0.0RC2 [ 13457 ] | |
| Fix Version/s | JRuby 1.0.0 [ 13502 ] | |
| Affects Version/s | JRuby 1.0.0RC2 [ 13457 ] | |
| Assignee | Thomas E Enebo [ enebo ] | Nick Sieger [ nsieger ] |
| Affects Version/s | JRuby 1.0.0RC1 [ 13070 ] |
Nick Sieger
made changes -
| Resolution | Fixed [ 1 ] | |
| Status | Open [ 1 ] | Resolved [ 5 ] |
Charles Oliver Nutter
made changes -
| Status | Resolved [ 5 ] | Closed [ 6 ] |
I assume the latter "smartness" isn't something you think we should make un-smart. Actually this is probably Java being smart for us, so I'm not sure we could dumb it down if we wanted to.
The process exit stuff should be fixed for sure though.