]> git.ozlabs.org Git - ccan/blobdiff - ccan/daemon-with-notify/daemon.c
update test case copied from daemonize to use some of daemon-with-notify features
[ccan] / ccan / daemon-with-notify / daemon.c
index 4232a0343f581fb2f2ccc601a8c70ab77a2043ca..625d65579499b8786d8764f3de92d3ce7696ffb0 100644 (file)
@@ -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.
  * 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 <fcntl.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -45,8 +38,8 @@
 #include <unistd.h>
 #include <sys/select.h>
 
-int daemonize(int nochdir, int noclose, int wait_sigusr1);
-int daemon_is_ready(void);
+#include <ccan/daemon-with-notify/daemon.h>
+
 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;