linux4sam / egt

Ensemble Graphics Toolkit - Modern C++ GUI Toolkit for AT91/SAMA5 Microprocessors
https://ensemble.graphics
Apache License 2.0
63 stars 25 forks source link

Allow non-zero exit values from app #22

Closed OOHehir closed 2 years ago

OOHehir commented 2 years ago

Suggest to modify Application::instance().quit() to allow it to pass values to EventLoop::quit().

By doing so it allows the EGT application to exit with non-zero return value which can be used by a monitoring program (e.g. bash script) to detect a normal/ clean exit or a request for restart.

Demo application included to demonstrate functionality.

Application::instance().quit() function prototype includes default value (0) so shouldn't break existing applications

ldesroches commented 2 years ago

Hello,

Thanks for this improvement, I am going to apply it (with minor changes). There is no signedoff-by. What name and mail should I use?

OOHehir commented 2 years ago

Thanks. You can use:

Owen O'Hehir electronicconsult1@gmail.com

Regards,

OOHehir commented 2 years ago

Closed as PR accepted