Opened 6 years ago

Closed 5 years ago

#12670 closed bug (no change required)

Cannot stop media job

Reported by: ttcoder Owned by: axeld
Priority: normal Milestone: R1
Component: Servers/launch_daemon Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All


Calling launch_roster stop x-vnd.haiku-media_server has no effect (I'm in hrev50095)

Maybe it's because the media server did not yet make the transition from "legacy" ? (if that indeed has some bearing on the issue I then might have picked the wrong component)

service x-vnd.Haiku-media_server {
	launch /system/servers/media_server
	on {

Change History (6)

comment:1 by ttcoder, 6 years ago

The use case is testing changes in the hda driver.

Historically I did hey media_server quit before installing my package, to dodge a KDL.

That no longer works of course (media_server gets restarted automatically), and neither does launch_roster in this case; I tried to install my package anyway, but was greeted by a KDL indeed. Makes coding/testing more painful than it should be: I'll have to find a work around by booting into safe mode, or blacklisting, and then rebooting in normal mode again to test my driver.

Maybe media_server should be a BServer instead of BApplication ? Or is the problem elsewhere ?

EDIT: word to the wise, do NOT use the "reboot to safe mode" method if you use Tracker in spatial mode and rely on Tracker perserving a set of open windows -- for some reason Tracker "forgets" its state and starts fresh with zero windows open, in Safe Mode

Last edited 6 years ago by ttcoder (previous) (diff)

comment:2 by pulkomandy, 6 years ago

You need to use both:

launch_roster stop x-vnd.haiku-media_server
hey media_server quit

The first command tells launch daemon to not automatically restart the media server, the second one stops it.

comment:3 by ttcoder, 6 years ago

That works indeed! thank you. Interestingly, the state is not remembered after a reboot, i.e. media_server will still be launched after a reboot. Might be worth filing an enhancement ticket if that'd be useful in other scenarios (not this one)

Could keep this ticket open to 1) document this behavior if it's the intended one in all cases (the usage text of launch_roster does not hint at this at all) or 2) make media_server consistent with others if there is an inconsistency

comment:4 by axeld, 6 years ago

Actually, launch_roster stop ... should also quit the media_server -- it doesn't do that yet, because it doesn't yet know how to talk to the running server. Don't worry, that'll be fixed one day :-)

Also, if you want to disable the media_server permanently, you would have to add a settings file for the launch_daemon that overwrites its job.

comment:5 by kallisti5, 5 years ago

Opened #13320 to track the real issue as reported by axeld.

comment:6 by kallisti5, 5 years ago

Resolution: no change required
Status: newclosed
Note: See TracTickets for help on using tickets.