X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fdaemon-with-notify%2Fdaemon.c;h=625d65579499b8786d8764f3de92d3ce7696ffb0;hb=8badbce50fdf6f49f8178c064c73f5e0f39174a9;hp=4232a0343f581fb2f2ccc601a8c70ab77a2043ca;hpb=4166cb1a3a22ef69d385a99c0a01bcbc41bd69f3;p=ccan diff --git a/ccan/daemon-with-notify/daemon.c b/ccan/daemon-with-notify/daemon.c index 4232a034..625d6557 100644 --- a/ccan/daemon-with-notify/daemon.c +++ b/ccan/daemon-with-notify/daemon.c @@ -1,5 +1,3 @@ -/* $Header: /cvsroot/wikipedia/willow/src/bin/willow/daemon.c,v 1.1 2005/05/02 19:15:21 kateturner Exp $ */ -/* $NetBSD: daemon.c,v 1.9 2003/08/07 16:42:46 agc Exp $ */ /*- * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. @@ -31,11 +29,6 @@ * SUCH DAMAGE. */ -#if defined __SUNPRO_C || defined __DECC || defined __HP_cc -# pragma ident "@(#)$Header: /cvsroot/wikipedia/willow/src/bin/willow/daemon.c,v 1.1 2005/05/02 19:15:21 kateturner Exp $" -# pragma ident "$NetBSD: daemon.c,v 1.9 2003/08/07 16:42:46 agc Exp $" -#endif - #include #include #include @@ -45,8 +38,8 @@ #include #include -int daemonize(int nochdir, int noclose, int wait_sigusr1); -int daemon_is_ready(void); +#include + void sigusr1_handler(int sig); pid_t parent_pid; @@ -57,7 +50,7 @@ void sigusr1_handler(int sig) _exit(EXIT_SUCCESS); } -int daemon_is_ready() +int daemon_is_ready(void) { kill(parent_pid, SIGUSR1); return 0;