diff --git a/src/common/daemonize.c b/src/common/daemonize.c
index dc6379ac9a36e99a9fc6830b31a05a60fa6ba87f..9e933ade9a0062999afc051476b2647f246aa62f 100644
--- a/src/common/daemonize.c
+++ b/src/common/daemonize.c
@@ -50,64 +50,6 @@
 #include "src/common/macros.h"
 #include "src/common/xassert.h"
 
-/* detach and go into background.
- * caller is responsible for umasks
- *
- * if nochdir == 0, will do a chdir to /
- * if noclose == 0, will close all FDs
- */
-int
-daemon(int nochdir, int noclose)
-{
-	switch (fork()) {
-		case  0 : break;        /* child */
-		case -1 : return -1;
-		default : _exit(0);     /* exit parent */
-	}
-
-	if (setsid() < 0)
-		return -1;
-
-	switch (fork()) {
-		case 0 : break;         /* child */
-		case -1: return -1;
-		default: _exit(0);      /* exit parent */
-	}
-
-	if (!nochdir && chdir("/") < 0) {
-		error("chdir(/): %m");
-		return -1;
-	}
-
-	/* Close all file descriptors if requested
-	 */
-	if (!noclose) {
-		closeall(0);
-		if (open("/dev/null", O_RDWR) != 0)
-			error("Unable to open /dev/null on stdin: %m");
-		dup2(0, STDOUT_FILENO);
-		dup2(0, STDERR_FILENO);
-	} else {
-		/*
-		 * Otherwise, dup stdin, stdout, and stderr onto /dev/null
-		 */
-		int devnull = open("/dev/null", O_RDWR);
-		if (devnull < 0)
-			error("Unable to open /dev/null: %m");
-		if (dup2(devnull, STDIN_FILENO) < 0)
-			error("Unable to dup /dev/null onto stdin: %m");
-		if (dup2(devnull, STDOUT_FILENO) < 0)
-			error("Unable to dup /dev/null onto stdout: %m");
-		if (dup2(devnull, STDERR_FILENO) < 0)
-			error("Unable to dup /dev/null onto stderr: %m");
-		if (close(devnull) < 0)
-			error("Unable to close /dev/null: %m");
-	}
-
-	return 0;
-
-}
-
 /*
  * Read and return pid stored in pidfile.
  * Returns 0 if file doesn't exist or pid cannot be read.
diff --git a/src/common/daemonize.h b/src/common/daemonize.h
index d7b4cc4a9a649b91372b82a4638c2c3f8c66fe7d..93dd8813c31a346692bf0b435355338bd05db501 100644
--- a/src/common/daemonize.h
+++ b/src/common/daemonize.h
@@ -36,18 +36,9 @@
  *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA.
 \*****************************************************************************/
 
-
 #ifndef _HAVE_DAEMONIZE_H
 #define _HAVE_DAEMONIZE_H
 
-/* fork process into background and inherit new session
- * if nochdir is 0, performs a chdir("/")
- * if noclose is 0, closes all fds and dups stdout/err of daemon onto /dev/null
- *
- * returns -1 on error.
- */
-extern int daemon(int nochdir, int noclose);
-
 /* Write pid into file pidfile if uid is not 0 change the owner of the
  * pidfile to that user.
  */