This reverts commit
e76a114e90e33a78408f5c04ad2eb35aca5b90d1.
This commit should be reconsidered
because systemd unit file cannot distinguish
between power-off SIGTERM and normal SIGTERM.
For example, deviced sends SIGTERM
when a process do not close fd using a file in SD-CARD
during the SD-card is removed / unmounted.
Deviced also sends SIGTERM during a power-off for unmounting /opt/usr.
Thus, a process cannot distiguish the situation with systemd unit.
As a result,
another solution for stopping service-restart during power-off
should be considered. (like modifying systemd or faultd)
Until the time, resourced's original solution should be kept.
cf) Solving the power-off animation problem,
deviced should wait to start "power-off animation service".
Change-Id: I5f271a427109cdf26847411f8dc1cea91742d2f9
proc_sweep_memory(PROC_SWEEP_EXCLUDE_ACTIVE, INIT_PID);
resourced_notify(RESOURCED_NOTIFIER_POWER_OFF, NULL);
+ umount2("/sys/fs/cgroup", MNT_FORCE|MNT_DETACH);
reply = dbus_message_new_method_return(msg);
dbus_message_iter_init_append(reply, &iter);
checkfd = 0;
}
+ /* unmount cgroup for preventing launching another release-agent */
+ _E("systemd service stop");
+ umount2("/sys/fs/cgroup", MNT_FORCE |MNT_DETACH);
+
/* check debug level */
if (check_debugenable())
run_exec(dumpargv);