Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 347789 - Equinox returning EXIT Code 0 on unsuccessful run
Summary: Equinox returning EXIT Code 0 on unsuccessful run
Status: RESOLVED WORKSFORME
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-31 10:06 EDT by Missing name CLA
Modified: 2019-09-04 01:52 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Missing name CLA 2011-05-31 10:06:56 EDT
Build Identifier: 3.6

We are using an Eclipse adopter product that runs workspace builds in a headless mode (no GUI). The run is successful but the return code at the end by equinox is 13 instead of being 0.

At the end of org.eclipse.core.runtime.adaptor.EclipseStarter#run(String[], Runnable) is this code:

// we only get here if an error happened
if (FrameworkProperties.getProperty(PROP_EXITCODE) == null) {
  FrameworkProperties.setProperty(PROP_EXITCODE, "13"); //$NON-NLS-1$
  FrameworkProperties.setProperty(PROP_EXITDATA, NLS.bind(EclipseAdaptorMsg.ECLIPSE_STARTUP_ERROR_CHECK_LOG, log == null ? null : log.getFile().getPath()));
}

this is suppose to set the property PROP_EXITCODE (eclipse.exitcode) to 13 in the system properties.

Then in org.eclipse.equinox.launcher.Main#run(String[]) it does the following:

String exitCode = System.getProperty(PROP_EXITCODE);

The problem is that exitCode is null for some reason... it doesn't get the value "13" set in the code I pasted above from  org.eclipse.core.runtime.adaptor.EclipseStarter#run(String[], Runnable).  As a result the JVM is terminated with an exit code of 0.

Reproducible: Always
Comment 1 Eclipse Genie CLA 2018-11-24 09:07:35 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 2 Lars Vogel CLA 2019-09-04 01:52:23 EDT
This bug was marked as stalebug a while ago. Marking as worksforme.

If this report is still relevant for the current release, please reopen and remove the stalebug whiteboard tag.