Opened 4 years ago

Last modified 4 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 X512, 4 years ago

I managed to integrate my Services preference with launch_daemon with TEST_MODE enabled. This helps to simplify launch_daemon debugging.

comment:2 by ttcoder, 4 years ago

Cc: ttcoder 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 X512, 4 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.

Last edited 4 years ago by X512 (previous) (diff)
Note: See TracTickets for help on using tickets.