svn commit: trunk/busybox/runit

vda at busybox.net vda at busybox.net
Wed Oct 29 03:45:33 UTC 2008


Author: vda
Date: 2008-10-28 20:45:33 -0700 (Tue, 28 Oct 2008)
New Revision: 23843

Log:
runsvdir: shrink (by Vladimir)



Modified:
   trunk/busybox/runit/runsvdir.c


Changeset:
Modified: trunk/busybox/runit/runsvdir.c
===================================================================
--- trunk/busybox/runit/runsvdir.c	2008-10-29 03:42:44 UTC (rev 23842)
+++ trunk/busybox/runit/runsvdir.c	2008-10-29 03:45:33 UTC (rev 23843)
@@ -98,15 +98,8 @@
 
 static void runsv(int no, const char *name)
 {
-	pid_t pid;
-	char *prog[3];
+	pid_t pid = vfork();
 
-	prog[0] = (char*)"runsv";
-	prog[1] = (char*)name;
-	prog[2] = NULL;
-
-	pid = vfork();
-
 	if (pid == -1) {
 		warn2_cannot("vfork", "");
 		return;
@@ -125,7 +118,7 @@
 			| (1 << SIGTERM)
 			, SIG_DFL);
 #endif
-		execvp(prog[0], prog);
+		execlp("runsv", "runsv", name, NULL);
 		fatal2_cannot("start runsv ", name);
 	}
 	sv[no].pid = pid;




More information about the busybox-cvs mailing list