rc-scripts/trunk/src: Makefile.am initlog.c minilogd.c

baggins cvs at pld-linux.org
Mon Oct 17 15:20:13 CEST 2005


Author: baggins
Date: Mon Oct 17 15:20:06 2005
New Revision: 6450

Removed:
   rc-scripts/trunk/src/minilogd.c
Modified:
   rc-scripts/trunk/src/Makefile.am
   rc-scripts/trunk/src/initlog.c
Log:
- removed minilogd and its calls (more pain than gain)



Modified: rc-scripts/trunk/src/Makefile.am
==============================================================================
--- rc-scripts/trunk/src/Makefile.am	(original)
+++ rc-scripts/trunk/src/Makefile.am	Mon Oct 17 15:20:06 2005
@@ -21,7 +21,6 @@
 	getkey \
 	initlog \
 	loglevel \
-	minilogd \
 	netreport \
 	ppp-watch \
 	start-stop-daemon \

Modified: rc-scripts/trunk/src/initlog.c
==============================================================================
--- rc-scripts/trunk/src/initlog.c	(original)
+++ rc-scripts/trunk/src/initlog.c	Mon Oct 17 15:20:06 2005
@@ -168,38 +168,6 @@
     return lines;
 }
 
-int startDaemon() {
-    int pid;
-    int rc;
-    
-    if ( (pid = fork()) == -1 ) {
-	perror("fork");
-	return -1;
-    }
-    if ( pid ) {
-	/* parent */
-	waitpid(pid,&rc,0);
-	if (WIFEXITED(rc)) {
-	  DDEBUG("minilogd returned %d!\n",WEXITSTATUS(rc));
-	  return WEXITSTATUS(rc);
-	}
-	else
-	  return -1;
-    } else {
-	int fd;
-	
-	fd=open("/dev/null",O_RDWR);
-	dup2(fd,0);
-	dup2(fd,1);
-	dup2(fd,2);
-        close(fd);
-	/* kid */
-	execlp("minilogd","minilogd",NULL);
-	perror("exec");
-	exit(-1);
-    }
-}
-
 int trySocket() {
 	int s;
 	struct sockaddr_un addr;
@@ -244,7 +212,6 @@
     
 	
     if  ( ((stat(_PATH_LOG,&statbuf)==-1) || trySocket())
-	  && startDaemon()
 	) {
 	DDEBUG("starting daemon failed, pooling entry %d\n",logEntries);
 	logData=realloc(logData,(logEntries+1)*sizeof(struct logInfo));



More information about the pld-cvs-commit mailing list