Skip to content

JApplication::Quit exit code param #463

@RaiqaRasool

Description

@RaiqaRasool

In JANA2, exiting the application with a specific exit code currently requires two separate calls:

japp->SetExitCode(code);
japp->Quit(true);

This differs from JANA1, where the exit code could be passed directly to Quit(), for example:

japp->Quit(code);

It would be better if the Quit() method accepted an optional exit code parameter, such as:

void Quit(int exitCode = 0, bool skipJoin = false);

This would allow setting the exit code and quitting the application in a single call, simplifying the interface and reducing the chance of errors.

Such a change would also improve consistency with the JANA1 API, making upgrades easier and usage more intuitive.

Overall, this would enhance usability by making the shutdown process clearer and less error-prone without breaking existing code.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions