shell exit code for runtime error differs between -e and -f

RESOLVED FIXED in mozilla15

Status

()

Core
JavaScript Engine
--
minor
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Jesse Ruderman, Assigned: sfink)

Tracking

Trunk
mozilla15
x86_64
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [js:t])

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
> ./js -e "z()"

1
http://hg.mozilla.org/mozilla-central/annotate/8899c0604bd1/js/src/shell/js.cpp#l4689

> ./js -f ~/Desktop/z.js

3
http://hg.mozilla.org/mozilla-central/annotate/8899c0604bd1/js/src/shell/js.cpp#l480
(Assignee)

Comment 1

5 years ago
Created attachment 621684 [details] [diff] [review]
Fix JS shell exit status on -e script failure

I think EXIT_FAILURE is intended to only be used for the shell machinery (argument parsing, etc.); any actual JS error should be EXITCODE_RUNTIME_ERROR (or one of the more specific ones.)
Attachment #621684 - Flags: review?(jimb)

Updated

5 years ago
Attachment #621684 - Flags: review?(jimb) → review+
Whiteboard: [js:t]
(Assignee)

Comment 2

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/3656a0a559b2
Assignee: general → sphink
Target Milestone: --- → mozilla15

Comment 3

5 years ago
https://hg.mozilla.org/mozilla-central/rev/3656a0a559b2
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.