Opened 3 years ago

Last modified 3 years ago

#13320 new bug

launch_roster doesn't know how to stop processes

Reported by: kallisti5 Owned by: axeld
Priority: normal Milestone: Unscheduled
Component: Servers/launch_daemon Version: R1/Development
Keywords: launch_roster Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

launch_roster doesn't know how to stop processes.

~> ps | grep debug_server | grep -v grep
~> launch_roster start x-vnd.haiku-debug_server
~> ps | grep debug_server | grep -v grep
/boot/system/servers/debug_server                  995676        2    0    0 
~> launch_roster info x-vnd.haiku-debug_server
Job: x-vnd.haiku-debug_server
BMessage(0x0) {
        name = string("x-vnd.haiku-debug_server", 25 bytes)
        team = int32(0xf315c or 995676)
        enabled = bool(true)
        running = bool(true)
        launched = bool(true)
        service = bool(true)
        launch = string("/system/servers/debug_server", 29 bytes)
        requires = string("init", 5 bytes)
        port = BMessage(0x0) {
                capacity = int32(0xc8 or 200)
                port = int32(0x9b431 or 635953)
        }
}
~> launch_roster stop x-vnd.haiku-debug_server
~> ps | grep debug_server | grep -v grep
/boot/system/servers/debug_server                  995676        2    0    0 

Change History (3)

comment:1 by kallisti5, 3 years ago

axeld mentioned the issue in #12670. Saw it tonight trying to figure out a clean way to restart the debug_server.

comment:2 by pulkomandy, 3 years ago

This works for the DeskBar, so there is at least some support in Launch Daemon for doing it.

comment:3 by axeld, 3 years ago

Just for reference, this is what the launch_daemon is doing: http://cgit.haiku-os.org/haiku/tree/src/servers/launch/LaunchDaemon.cpp#n1636

I think it sometimes has problems actually finding the correct messenger which is probably causing the issue. I don't remember exactly, but, that problem should be gone once TRoster functionality is handled by the launch_daemon, so I didn't spend too much time on it.

The problem could probably be relieved easily by checking the return code of the SendMessage() call, and only return on success. But that would also mean that those teams aren't properly shut down.

Note: See TracTickets for help on using tickets.