Opened 5 years ago
Last modified 5 years ago
#15922 new bug
launch_daemon: add node monitoring for launch scripts
Reported by: | X512 | Owned by: | axeld |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | Servers/launch_daemon | Version: | R1/Development |
Keywords: | Cc: | ttcoder | |
Blocked By: | Blocking: | ||
Platform: | All |
Description
This is hrev54101.
If new launch script is inserted to launch folder, it should be parsed and required jobs should be started. When launch script is removed, all jobs declared inside it should be stopped.
Change History (3)
comment:1 by , 5 years ago
comment:2 by , 5 years ago
Cc: | added |
---|
We've had to give up on running our app in CoS ("service mode") for now, as I could not get any combination of adding/removing/enabling/disabling files/daemons/etc to allow the user to decide to quit (and re-enter) "continuity of service" mode. Fortunately Haiku is stable for us now so we don't miss that CoS aspect, at least for now. But in case we need it again in the future, I'll keep an eye on this and #15923. If removing a launch script from the bfs (not packagefs of course, as that's read-only) area disables the auto-relaunch, and allows the user to quit the app, that would achieve what I've bee unable to implement so far. I'm not certain we would wish for the app itself to be quit upon that change though.
PS - nitpicking: maybe this ticket is for an enhancement rather than a bug :-)
comment:3 by , 5 years ago
I consider that if launch script is added, autostart jobs should be started and if launch script is removed, all jobs inside it should be stopped. launch_daemon should store list of loaded launch script files in RAM and each item should reference jobs declared in item.
If removing a launch script from the bfs (not packagefs of course, as that's read-only)
Removing launch script inside package can be done by deactivating package.
I'll keep an eye on this and #15923.
About #15923, currently I am consider only autostart and enable/disable persistent configuration. If you need something else please tell about it.
PS - nitpicking: maybe this ticket is for an enhancement rather than a bug :-)
Other launch systems such as Linux systemd and Windows services support adding services without reboot. I think that it is important feature.
I managed to integrate my Services preference with launch_daemon with TEST_MODE enabled. This helps to simplify launch_daemon debugging.