Closed
Bug 700203
Opened 15 years ago
Closed 15 years ago
Pymake needs to survive native commands doing sys.exit(0)
Categories
(Firefox Build System :: General, defect)
Firefox Build System
General
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla10
People
(Reporter: khuey, Assigned: khuey)
Details
Attachments
(1 file, 1 obsolete file)
|
1.69 KB,
patch
|
ted
:
review+
|
Details | Diff | Splinter Review |
No description provided.
| Assignee | ||
Comment 1•15 years ago
|
||
Assignee: nobody → khuey
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla10
| Assignee | ||
Comment 2•15 years ago
|
||
Attachment #572374 -
Flags: review?(ted.mielczarek)
| Assignee | ||
Comment 3•15 years ago
|
||
Comment 4•15 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Comment 5•15 years ago
|
||
Comment on attachment 572374 [details] [diff] [review]
Patch
Review of attachment 572374 [details] [diff] [review]:
-----------------------------------------------------------------
::: pymake/process.py
@@ +215,5 @@
> print >>sys.stderr, e
> return e.exitcode
> except:
> + e = sys.exc_info()[1]
> + if isinstance(e, SystemExit) and e.code == '0':
This doesn't make sense to me. From the Python docs:
http://docs.python.org/library/exceptions.html#exceptions.SystemExit
Is someone actually calling sys.exit('0')? That really should cause the Python interpreter to exit with an error! We should fix the caller in that case, and just check for e.code == 0 or e.code is None here.
::: tests/pycmd.py
@@ +8,5 @@
> with open(args[0], 'w') as f:
> f.write(os.environ[args[1]])
> +
> +def asplode(args):
> + sys.exit(args[0])
This probably wants to be int(args[0]), no?
Attachment #572374 -
Flags: review?(ted.mielczarek) → review-
| Assignee | ||
Comment 6•15 years ago
|
||
Aha!
Attachment #572374 -
Attachment is obsolete: true
Attachment #572434 -
Flags: review?(ted.mielczarek)
Comment 7•15 years ago
|
||
Comment on attachment 572434 [details] [diff] [review]
Patch
Review of attachment 572434 [details] [diff] [review]:
-----------------------------------------------------------------
::: pymake/process.py
@@ +215,5 @@
> print >>sys.stderr, e
> return e.exitcode
> except:
> + e = sys.exc_info()[1]
> + if isinstance(e, SystemExit) and e.code == 0:
I think according to that link I pasted before, this wants to be "e.code == 0 or e.code is None".
Attachment #572434 -
Flags: review?(ted.mielczarek) → review+
Updated•8 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•