If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

With MOZ_CRASHREPORTER_SHUTDOWN environment variable set the browser should quit with a non 0 exit code

NEW
Unassigned

Status

()

Toolkit
Startup and Profile System
P5
normal
4 months ago
a month ago

People

(Reporter: whimboo, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 months ago
With bug 1311016 we originally implemented the shutdown sequence for a content crash and MOZ_CRASHREPORTER_SHUTDOWN set. Sadly this causes Firefox to quit with the exit code 0.

To better reflect that the browser has been quit due to a crash we should select a non 0 exit code.

Has anyone an idea how to do this?

Comment 1

4 months ago
I'm going to link to the codepaths currently involved in setting a return value, but I don't see an obvious place to interject this.

rv here: http://searchfox.org/mozilla-central/rev/d441cb24482c2e5448accaf07379445059937080/toolkit/xre/nsAppRunner.cpp#4833
comes from the end of xre_mainrun where it calls nsAppStartup::Run: http://searchfox.org/mozilla-central/rev/d441cb24482c2e5448accaf07379445059937080/toolkit/xre/nsAppRunner.cpp#4571
which comes from here: http://searchfox.org/mozilla-central/rev/d441cb24482c2e5448accaf07379445059937080/toolkit/components/startup/nsAppStartup.cpp#288

Since return codes are fragile, please add an automated test to make sure this keeps working? I suspect you're aware of the old bug 894697 which asked for a generic API for setting the Firefox return code. I rejected that because at the time we couldn't write tests for it, and there are end-user cases where it would break. For specific automation needs where we know we're not going to be doing restarts for update that's less of a problem, but it's still going to be fragile.
Component: General → Startup and Profile System
Product: Firefox → Toolkit

Updated

3 months ago
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.