From c186ed323c939b76478cae6c8cca85efcc4b97c0 Mon Sep 17 00:00:00 2001 From: YoungHun Kim Date: Tue, 10 Jul 2018 15:41:09 +0900 Subject: Merge branch 'tizen' to 'tizen_4.0' - Launch as a daemon and set systemd service type to forking - Diable the dependency of dbus because not related actally with dbus (core) - Enable the dlog of murphy - Change to daemonize after stream flush Change-Id: If9dc2d9542e773c844961eedf8249759a2a5b6ae --- packaging/murphy.spec | 11 +++++++---- packaging/murphyd.service | 3 ++- packaging/org.Murphy.conf.in | 8 +++++++- src/daemon/daemon.c | 2 +- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/packaging/murphy.spec b/packaging/murphy.spec index b58e7c3..0706b1c 100644 --- a/packaging/murphy.spec +++ b/packaging/murphy.spec @@ -3,11 +3,11 @@ %bcond_without pulse %bcond_without ecore %bcond_without glib -%bcond_without dbus +%bcond_with dbus %bcond_without telephony %bcond_without websockets %bcond_without smack -%bcond_without sysmon +%bcond_with sysmon # These are off by default, unless explicitly enabled. # @@ -29,7 +29,7 @@ Summary: Resource policy framework Name: murphy Version: 0.0.74 -Release: 10 +Release: 14 License: BSD-3-Clause Group: System/Service URL: http://01.org/murphy/ @@ -247,9 +247,12 @@ CONFIG_OPTIONS="$CONFIG_OPTIONS --disable-websockets" CONFIG_OPTIONS="$CONFIG_OPTIONS --disable-smack" #%endif -# relro +#relro CONFIG_OPTIONS="$CONFIG_OPTIONS --enable-relro" +#dlog +CONFIG_OPTIONS="$CONFIG_OPTIONS --enable-dlog" + ./bootstrap %configure $CONFIG_OPTIONS --with-dynamic-plugins=$DYNAMIC_PLUGINS %__make clean diff --git a/packaging/murphyd.service b/packaging/murphyd.service index f99297b..324a2eb 100644 --- a/packaging/murphyd.service +++ b/packaging/murphyd.service @@ -2,7 +2,8 @@ Description=Murphy Resource Policy Daemon [Service] -ExecStart=/usr/bin/murphyd -t dlog -vvv -f +ExecStart=/usr/bin/murphyd -t dlog -vvv +Type=forking KillMode=process KillSignal=SIGKILL Restart=always diff --git a/packaging/org.Murphy.conf.in b/packaging/org.Murphy.conf.in index 643df47..d20d5c6 100644 --- a/packaging/org.Murphy.conf.in +++ b/packaging/org.Murphy.conf.in @@ -3,8 +3,14 @@ "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> - + + + + + + + diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c index 65dee9b..8df12b0 100644 --- a/src/daemon/daemon.c +++ b/src/daemon/daemon.c @@ -291,9 +291,9 @@ int main(int argc, char *argv[], char *envp[]) load_ruleset(ctx); prepare_ruleset(ctx); setup_logging(ctx); - daemonize(ctx); set_linebuffered(stdout); set_nonbuffered(stderr); + daemonize(ctx); run_mainloop(ctx); stop_plugins(ctx); -- cgit v1.2.3