#
6326cd51 |
| 16-Jul-2024 |
Augustin Cavalier <waddlesplash@gmail.com> |
launch_daemon: Remove setting of LC_TYPE.
This appears to be a typo for LC_CTYPE, and as such nothing ever used it. Environment settings are set up by SetupEnvironment anyway, and if unset just defa
launch_daemon: Remove setting of LC_TYPE.
This appears to be a typo for LC_CTYPE, and as such nothing ever used it. Environment settings are set up by SetupEnvironment anyway, and if unset just default to C/POSIX locale, so this isn't needed here.
show more ...
|
#
699bc536 |
| 24-Jul-2023 |
PulkoMandy <pulkomandy@pulkomandy.tk> |
Launch daemon: fix some unused variables
Used for tracing only, so mark them as unused when tracing is disabled.
Change-Id: I76acb0f18ccab12512eaa4b2644e9d57c591b9ef Reviewed-on: https://review.hai
Launch daemon: fix some unused variables
Used for tracing only, so mark them as unused when tracing is disabled.
Change-Id: I76acb0f18ccab12512eaa4b2644e9d57c591b9ef Reviewed-on: https://review.haiku-os.org/c/haiku/+/6740 Reviewed-by: waddlesplash <waddlesplash@gmail.com> Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
show more ...
|
#
46b7da1f |
| 08-May-2022 |
Niels Sascha Reedijk <niels.reedijk@gmail.com> |
Merge branch 'master' into dev/netservices
Change-Id: I1eb6c2ea2fd0d794ad6378eab8bbb80ce46dfbb8
|
#
7d2a6f2d |
| 17-Feb-2022 |
Augustin Cavalier <waddlesplash@gmail.com> |
launch_daemon: Rework how user-session spawning functions.
* Instead of fork()ing, which leaks memory (and runs a second BApplication inside the Run() of the original one, which was the sourc
launch_daemon: Rework how user-session spawning functions.
* Instead of fork()ing, which leaks memory (and runs a second BApplication inside the Run() of the original one, which was the source of a TODO), use posix_spawn to start a second process altogether.
* Move session initialization code to the new user_main(), invoked from main() if we are starting a user session.
* Send event registration messages to the new session daemon in _HandleRegisterSessionDaemon, as the child no longer has access to the old events list from before fork()ing and must receive it.
The last of these fixes a race: previously, if an event was registered or triggered between when the child (user) launch_daemon was fork()ed off the parent and when it registered with the root launch_daemon, those events were "lost" and would never be forwarded to the child.
That happened not altogether infrequently for some people (myself included) especially in virtual machines for the "initial_volumes_mounted" event, which was the most common remaining cause of "boot hangs on rocket" or "boots to blue screen with only mouse cursor" problems.
So, in addition to being cleaner overall and resolving a number of TODOs, this also fixes #17365.
Change-Id: I1ea28cba8938a38b3c27685d7f3943f596cfe7ec Reviewed-on: https://review.haiku-os.org/c/haiku/+/4968 Reviewed-by: waddlesplash <waddlesplash@gmail.com> Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com> Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
show more ...
|
#
268f99dd |
| 22-Dec-2021 |
Niels Sascha Reedijk <niels.reedijk@gmail.com> |
Merge branch 'master' into dev/netservices
|
#
7f4c5a1f |
| 30-Sep-2021 |
Augustin Cavalier <waddlesplash@gmail.com> |
launch_daemon: Do not return errors from RegisterExternalEvent.
We will pick up events that have no match later on, and if we return an error here, it will prevent the job from being initialized, wh
launch_daemon: Do not return errors from RegisterExternalEvent.
We will pick up events that have no match later on, and if we return an error here, it will prevent the job from being initialized, which we definitely do not want.
Fixes #17291.
show more ...
|
#
ce308ddc |
| 29-Sep-2021 |
Augustin Cavalier <waddlesplash@gmail.com> |
launch_daemon: Trigger sticky-already-triggered external events immediately.
If the external event is sticky and already triggered, then we want to trigger any newly-added events immediately. This f
launch_daemon: Trigger sticky-already-triggered external events immediately.
If the external event is sticky and already triggered, then we want to trigger any newly-added events immediately. This fixes "boot hangs on rocket" regressions following 4f126f690c17de00f44135f46acf0664ede61ab1, which seems to have exacerbated this already-existing race condition.
Fixes #17289.
Change-Id: Ie405826cc50255895c8831c34b8bdf902e584eb5 Reviewed-on: https://review.haiku-os.org/c/haiku/+/4510 Reviewed-by: waddlesplash <waddlesplash@gmail.com>
show more ...
|
#
b19b3d9b |
| 28-Sep-2021 |
Augustin Cavalier <waddlesplash@gmail.com> |
launch_daemon: Refactor handling of ExternalEventSources.
* Refactor ResolveExternalEvent to actually return the resolved event, not just whether or not one was found, and then skip resolution
launch_daemon: Refactor handling of ExternalEventSources.
* Refactor ResolveExternalEvent to actually return the resolved event, not just whether or not one was found, and then skip resolution in TriggerExternalEvent and ResetStickyExternalEvent, which now should only be passed ExternalEvents.
* ExternalEventSources now store destination Events, not Jobs, following on that refactor.
* The second variant of ResolveExternalEvents is dropped, and instead the Register/Unregister functions are implemented.
* Trigger and ResetSticky are now done in ExternalEventSource, which now keeps track of whether it has been sticky-triggered or not, though it does not use this information yet.
These changes should not affect behavior, they largely constitute a reorganization (though some TODOs are resolved.)
Change-Id: I46a51cac0edb90e90b154ef9c94791cb7a1aad94 Reviewed-on: https://review.haiku-os.org/c/haiku/+/4509 Reviewed-by: waddlesplash <waddlesplash@gmail.com>
show more ...
|
#
07497347 |
| 21-Dec-2019 |
Jérôme Duval <jerome.duval@gmail.com> |
launch_daemon: don't relaunch when a shutdown is in progress
Change-Id: Ice0dd504f65f592eb64ec0e2192ef42b88486daa Reviewed-on: https://review.haiku-os.org/c/haiku/+/2043 Reviewed-by: waddlesplash <w
launch_daemon: don't relaunch when a shutdown is in progress
Change-Id: Ice0dd504f65f592eb64ec0e2192ef42b88486daa Reviewed-on: https://review.haiku-os.org/c/haiku/+/2043 Reviewed-by: waddlesplash <waddlesplash@gmail.com>
show more ...
|
#
a77aa747 |
| 25-Apr-2018 |
Axel Dörfler <axeld@pinc-software.de> |
launch_daemon: Added basic logging facility
* The daemon now stores many events in am internal log. * You can use "launch_roster log" to retrieve it.
|
#
6d7b8a30 |
| 04-Dec-2017 |
Axel Dörfler <axeld@pinc-software.de> |
launch_daemon: Renamed TeamRegistrator to TeamListener
|
#
e96835a9 |
| 27-Nov-2017 |
Axel Dörfler <axeld@pinc-software.de> |
Added simple test_launch_daemon.
* Expects its config files in /boot/home/test_launch. * Uses standard I/O, and is always in user mode. * Also added test_launch_roster command that is able to talk t
Added simple test_launch_daemon.
* Expects its config files in /boot/home/test_launch. * Uses standard I/O, and is always in user mode. * Also added test_launch_roster command that is able to talk to the test server like it does to the real thing.
show more ...
|
#
bc600adb |
| 07-Apr-2017 |
Axel Dörfler <axeld@pinc-software.de> |
launch_daemon: Don't allow restarting.
* Check if the port already exists on startup. This fixes #12901.
|
#
852e09d6 |
| 29-Nov-2016 |
Axel Dörfler <axeld@pinc-software.de> |
launch_daemon: Added stop target ability.
* Before, you had to stop each job by itself.
|
#
4d99bf9a |
| 29-Nov-2016 |
Axel Dörfler <axeld@pinc-software.de> |
launch_daemon: Added missing reply for launch target.
* Caused BLaunchRoster::Target() to return B_NO_REPLY instead of B_OK.
|
#
bab64f65 |
| 19-Feb-2016 |
Alexander von Gluck IV <Alex.vonGluck@r1soft.com> |
Merge remote-tracking branch 'upstream/master' into intel-extreme
|
#
90fd6af0 |
| 12-Jan-2016 |
Axel Dörfler <axeld@pinc-software.de> |
launch_daemon: Added ability to enable/disable a job.
* Instead of just starting/stopping it. * Also available via the launch_roster command.
|
#
c302a243 |
| 23-Dec-2015 |
Alexander von Gluck IV <kallisti5@unixzen.com> |
Merge remote-tracking branch 'upstream/master' into intel-extreme
|
#
d9bb9513 |
| 19-Oct-2015 |
Axel Dörfler <axeld@pinc-software.de> |
launch_daemon: "file_exists" now resolves $HOME, and '~'.
|
#
4ae4b3ff |
| 18-Oct-2015 |
Axel Dörfler <axeld@pinc-software.de> |
launch_daemon: Fixed the remaining "operation not allowed" bug.
* This was the harmless part: a job was been requeued that already was being launched. * I was already aware of this one, and only a
launch_daemon: Fixed the remaining "operation not allowed" bug.
* This was the harmless part: a job was been requeued that already was being launched. * I was already aware of this one, and only accidentally stumbled over the non-harmless case in the JobQueue code when I tried to fix that little issue... (ie. never ignore warnings, even if you think you know what's going on).
show more ...
|
#
7cd19b7e |
| 17-Oct-2015 |
Axel Dörfler <axeld@pinc-software.de> |
launch_daemon: Implemented sticky events, and registration.
* Sticky events are events that keep their signal raised, ie. even if a job is initialized afterwards, it will still be triggered. * Con
launch_daemon: Implemented sticky events, and registration.
* Sticky events are events that keep their signal raised, ie. even if a job is initialized afterwards, it will still be triggered. * Consolidated naming for external events. * Events are now registered once they are actually being used. This allows them to allocate the resources they need to do their thing.
show more ...
|
#
e96f5c33 |
| 15-Oct-2015 |
Axel Dörfler <axeld@pinc-software.de> |
launch_daemon: Renamed RegisteredEvent to ExternalEventSource.
* With events being registered, this proved to be confusing, and it also helps to differentiate between event objects within the daem
launch_daemon: Renamed RegisteredEvent to ExternalEventSource.
* With events being registered, this proved to be confusing, and it also helps to differentiate between event objects within the daemon, and events coming from external sources.
show more ...
|
#
e048384d |
| 13-Oct-2015 |
Axel Dörfler <axeld@pinc-software.de> |
launch_daemon: launching on demand now actually works.
* Was broken in two ways: if only the shortcut "on_demand" was used, the event didn't get created at all due to a bug in Events::AddOnDeman
launch_daemon: launching on demand now actually works.
* Was broken in two ways: if only the shortcut "on_demand" was used, the event didn't get created at all due to a bug in Events::AddOnDemand(). * Furthermore, _LaunchJob() always triggered a demand, but it should only do this when not called from a target.
show more ...
|
#
16844b92 |
| 11-Sep-2015 |
Axel Dörfler <axeld@pinc-software.de> |
launch_daemon: Open stdin/out/err FDs.
* As with the boot script, point them to /dev/null. * This should fix #12298.
|
#
14156a33 |
| 26-Aug-2015 |
Michael Lotz <mmlr@mlotz.ch> |
launch_daemon: Delegate launch data replies to Job.
Previously the LaunchDaemon would send out its own team id when a given job was not yet launched, leading to invalid BMessengers once the port own
launch_daemon: Delegate launch data replies to Job.
Previously the LaunchDaemon would send out its own team id when a given job was not yet launched, leading to invalid BMessengers once the port owner changed to the actually launched team.
The launch of the target team and the launch data replies were also not synchronized, which could lead to the launched team getting a reply pointing to the launch_daemon when requesting data for itself. This is the case for the BRoster init of the registrar. The fix in hrev49561 therefore didn't always work, because the registrar would sometimes get the launch_daemon team id instead of the id of itself. It would later try talking to the launch_daemon, which obviously never replied, leading to #12237.
The LaunchDaemon now delegates the launch data reply to the Job instead. The Job either replies directly, in case it has already been launched, or queues the reply for when the launch completes. This causes launch data requesters to block until the launch attempt is completed, but won't block the LaunchDaemon message loop.
This commit introduces the seperate fLaunchStatus to properly handle the ambiguity of fTeam being < 0, which is the case for both, when no launch was attempted and when the launch failed. This new field now determines what IsLaunched() returns and how launch data replies are handled.
The new launch status is additionally protected by the launch status lock, which will later probably be made broader in scope to protect against race conditions once service monitoring is implemented.
show more ...
|