diff options
author | Michal Bloch <m.bloch@samsung.com> | 2018-07-17 15:10:54 +0200 |
---|---|---|
committer | Michal Bloch <m.bloch@samsung.com> | 2018-07-24 14:27:29 +0000 |
commit | cfd7f531caa1c102ef79dd1b4174979287ff43f3 (patch) | |
tree | 8d92d50d04064e932d18bbf4eae1b2607e5f4372 | |
parent | 20248845aa7719653d7a845076624c6fd1aa41bc (diff) | |
download | resourced-cfd7f531caa1c102ef79dd1b4174979287ff43f3.tar.gz resourced-cfd7f531caa1c102ef79dd1b4174979287ff43f3.tar.bz2 resourced-cfd7f531caa1c102ef79dd1b4174979287ff43f3.zip |
Don't listen to DeviceD power off signalsubmit/tizen_4.0/20180724.143421accepted/tizen/4.0/unified/20180803.172106
DeviceD currently sends the ChangeState signal on the PowerOff interface,
which causes resourced's main loop to quit, before the PrePowerOff method
is called (which then is not handled). With PrePowerOff uncalled, the VIP
cgroup is left mounted, which causes the platform to reboot on the death
of any VIP process. This makes it impossible to do a regular poweroff as
VIPs die throughout which replaces the poweroff with a reboot.
Removing the signal handler is safe as the signal is somewhat redundant.
Quitting the main loop happens eventually regardless since at some point
DeviceD sends SIGTERM (which also quits the main loop).
Change-Id: I552e4575ad97ae377a96daa0cba24bbe03c0d3bf
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
-rwxr-xr-x | src/proc-stat/proc-monitor.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/proc-stat/proc-monitor.c b/src/proc-stat/proc-monitor.c index 1ceb3b19..1561faad 100755 --- a/src/proc-stat/proc-monitor.c +++ b/src/proc-stat/proc-monitor.c @@ -774,12 +774,6 @@ static void low_battery_signal_handler(GVariant *params) resourced_notify(RESOURCED_NOTIFIER_LOW_BATTERY, NULL); } -static void poweroff_signal_handler(GVariant *params) -{ - _E("quit mainloop at poweroff"); - resourced_quit_mainloop(); -} - static void systemtime_changed_signal_handler(GVariant *params) { resourced_notify(RESOURCED_NOTIFIER_SYSTEMTIME_CHANGED, NULL); @@ -1064,8 +1058,10 @@ static const struct d_bus_signal dbus_signals[] = { SIGNAL_DEVICED_LCDOFF, proc_dbus_lcd_off, NULL}, {DEVICED_PATH_CORE, DEVICED_INTERFACE_CORE, SIGNAL_DEVICED_BOOTINGDONE, booting_done_signal_handler, NULL}, - {DEVICED_PATH_POWEROFF, DEVICED_INTERFACE_POWEROFF, - SIGNAL_DEVICED_POWEROFF_STATE, poweroff_signal_handler, NULL}, + /* DEVICED_INTERFACE_POWEROFF / SIGNAL_DEVICED_CHANGESTATE left unhandled + on purpose - DeviceD sends the signal earlier than supposed to. Nothing + is lost though because at some point DeviceD also sends a SIGTERM, + which is handled the same way (i.e. quits the main loop). */ {DEVICED_PATH_BATTERY, DEVICED_INTERFACE_BATTERY, SIGNAL_DEVICED_LOW_BATTERY, low_battery_signal_handler, NULL}, {DUMP_SERVICE_OBJECT_PATH, DUMP_SERVICE_INTERFACE_NAME, |