summaryrefslogtreecommitdiff
path: root/src/daemon/daemon.c
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2009-02-15 14:35:55 +0100
committerAndreas Baumann <abaumann@yahoo.com>2009-02-15 14:35:55 +0100
commit292d972e6aa38803decbbc2d7a0e47abacfe2017 (patch)
treef987ccc6b0cdca8c4a40bfdcaf80e20b0afa9a94 /src/daemon/daemon.c
parent6df1762f9d029be535f9fde6c2b827ef592fbafa (diff)
downloadwolfbones-292d972e6aa38803decbbc2d7a0e47abacfe2017.tar.gz
wolfbones-292d972e6aa38803decbbc2d7a0e47abacfe2017.tar.bz2
some cleanup in the daemon.c code
Diffstat (limited to 'src/daemon/daemon.c')
-rw-r--r--src/daemon/daemon.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c
index cdf6ae1..5fae587 100644
--- a/src/daemon/daemon.c
+++ b/src/daemon/daemon.c
@@ -32,6 +32,13 @@ static void notify_parent_handler( int sig ) {
}
WOLF_SIGNALS_INSTALL_FUNC( notify_parent, notify_parent_handler )
+static void notify_handler( int sig ) {
+ if( daemon_signal_pipe[1] != -1 )
+ (void)write( daemon_signal_pipe[1], &sig, sizeof( int ) );
+}
+
+WOLF_SIGNALS_INSTALL_FUNC( notify, notify_handler )
+
typedef enum {
TERMINATE_OK,
TERMINATE_ERROR,
@@ -853,10 +860,3 @@ wolf_error_t wolf_daemon_signals_install_handlers( void ) {
return WOLF_OK;
}
-
-static void notify_handler( int sig ) {
- if( daemon_signal_pipe[1] != -1 )
- (void)write( daemon_signal_pipe[1], &sig, sizeof( int ) );
-}
-
-WOLF_SIGNALS_INSTALL_FUNC( notify, notify_handler )