Opened 9 years ago
Last modified 9 years ago
#12638 new bug
I'm using launch_daemon to start an application at boot, but I can no longer properly reboot or shutdown Haiku
Reported by: | Giova84 | Owned by: | axeld |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | Servers/launch_daemon | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | x86 |
Description
Well, as I've said in the subject of this ticket, I'm currently using the launch daemon to run an app at startup: polipo proxy, a cli app http://www.pps.univ-paris-diderot.fr/~jch/software/polipo/
Before of the introduction of the launch daemon, I usually launch polipo using a bash script placed in /boot/home/config/settings/boot/launch. Now, instead, I made a configuration file called "polipo", placed inside /boot/system/data/user_launch with the following content:
service x-vnd.Polipo-Proxy { launch /bin/polipo no_safemode }
Everything works fine except for the fact that when I attempt to reboot or shutdown Haiku, an alert window told me that "polipo might be blocked on a modal panel during shutdown". I also tried to make a shutdown script where I try to pass the command "kill polipo", but the situation is always the same. I properly set the signature for polipo "application/x-vnd.Polipo-Proxy". Inside the syslog I don't see anything related to polipo or to the launch_daemon. I miss something?
Change History (4)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
I partially solved launching polipo in this way:
job system-proxy { launch /system/bin/polipo logFile="/var/log/polipo.log" }
(I add the log file to investigate about the issue, unfortunately without any hints)
It still hangs at reboot/shutdown, but now, If i send a kill signal to polipo
~> kill polipo
Is properly quitted and no longer hangs at reboot/shutdown (previously, when I attempted to kill polipo, it was immediately restarted).
However: I also running polipo on Linux, and sometimes (eg when I apply changes to polipo's config files - or when I add some site to block inside the "forbidden file") I do a
~> sudo /etc/init.d/polipo restart
Which quit and immediately restart polipo.
With the first method on Haiku (the method which prevents to definitively quit polipo), the following:
service x-vnd.Polipo-Proxy { launch /bin/polipo no_safemode }
When I send a kill signal to Polipo, it exactly acts as on Linux using init.d . The fact is that the above method which I used firstly, was the most practical to administrate polipo. Maybe there is a proper way or some options/commands to avoid the hangs at reboot/shutdown?
follow-up: 4 comment:3 by , 9 years ago
The first way of establishing the service is definitely correct. Unfortunately, you've run into an open issue with launch_daemon. Currently, launch_daemon isn't properly aware of the shutdown process, so will try to relaunch services during the shutdown process. This can be seen in the syslog with attempts by the launch_daemon to restart the Deskbar and Tracker failing.
comment:4 by , 9 years ago
Replying to jessicah:
The first way of establishing the service is definitely correct. Unfortunately, you've run into an open issue with launch_daemon. Currently, launch_daemon isn't properly aware of the shutdown process, so will try to relaunch services during the shutdown process. This can be seen in the syslog with attempts by the launch_daemon to restart the Deskbar and Tracker failing
Possibly related to ticket #12306? In my case,the shutdown problem appeared on my system immediately after the launch_daemon merge.
Replying to Giova84:
I've also tried using
But the issue with reboot and shutdown is still here. So, maybe is not permitted to using the launch_daemon to run cli apps or bash script at startup? The fact is that the launch_deamon also permits to automatically relaunch apps when they crashs/fails, which would be very useful for background apps. I'm waiting for the reply from Axel :-)