helloSystem / launch

Command line tool to launch applications, will search for .app bundles and .AppDir directories in various directories, and will show launch errors in the GUI
BSD 2-Clause "Simplified" License
16 stars 5 forks source link

Add a way to keep relaunching the payload process in case it exits #15

Open probonopd opened 3 years ago

probonopd commented 3 years ago

Add a way to keep relaunching the payload process in case it exits with an exit code other than 0.

Use case: launch --relaunch-on-exit Filer --desktop could be used in the startup script. If Filer crashes, it would get automatically restarted. (Reference: https://github.com/helloSystem/hello/issues/172#issuecomment-862589188)

Note: The time between two non-successful launches should double every time it is tried (to prevent from "respawning too fast" situations due to launch-crash-launch-crash loops).

Is this a sensible behavior?