diff -Naur busybox.orig/printutils/lpd.c busybox/printutils/lpd.c
--- busybox.orig/printutils/lpd.c	2008-03-25 00:40:19 +0000
+++ busybox/printutils/lpd.c	2008-03-25 00:56:46 +0000
@@ -88,42 +88,6 @@
 }
 
 // we can use leaky setenv since we are about to exec or exit
-static void exec_helper(char **filenames, char **argv) ATTRIBUTE_NORETURN;
-static void exec_helper(char **filenames, char **argv)
-{
-	char *p, *q;
-	char var[2];
-
-	var[1] = '\0';
-
-	// read and delete ctrlfile
-	q = xmalloc_open_read_close(filenames[0], NULL);
-	unlink(filenames[0]);
-	// provide datafile name
-	xsetenv("DATAFILE", filenames[1]);
-	// parse control file by "\n"
-	while ((p = strchr(q, '\n')) != NULL
-	 && isalpha(*q)
-	) {
-		*p++ = '\0';
-		// q is a line of <SYM><VALUE>,
-		// we are setting environment string <SYM>=<VALUE>.
-		// Ignoring "l<datafile>", exporting others:
-		if (*q != 'l') {
-			var[0] = *q++;
-			xsetenv(var, q);
-		}
-		// next line, plz!
-		q = p;
-	}
-	// we are the helper, we wanna be silent.
-	// this call reopens stdio fds to "/dev/null"
-	// (no daemonization is done)
-	bb_daemonize_or_rexec(DAEMON_DEVNULL_STDIO | DAEMON_ONLY_SANITIZE, NULL);
-	BB_EXECVP(*argv, argv);
-	exit(127); // it IS error if helper cannot be executed!
-}
-
 static char *xmalloc_read_stdin(void)
 {
 	// SECURITY:
@@ -271,11 +235,38 @@
 		close(fd); // NB: can do close(-1). Who cares?
 
 		// spawn spool helper and exit if all files are dumped
+		// N.B. helper does not return (we exit 127 if helper cannot be executed)
 		if (7 == spooling && *argv) {
+			char *p, *q, var[2];
+			var[1] = '\0';
 			// signal OK
 			safe_write(STDOUT_FILENO, "", 1);
-			// does not return (exits 0)
-			exec_helper(filenames, argv);
+			// read and delete ctrlfile
+			q = xmalloc_open_read_close(filenames[0], NULL);
+			unlink(filenames[0]);
+			// provide datafile name
+			xsetenv("DATAFILE", filenames[1]);
+			// parse control file by "\n"
+			while ((p = strchr(q, '\n')) != NULL
+			 && isalpha(*q)
+			) {
+				*p++ = '\0';
+				// q is a line of <SYM><VALUE>,
+				// we are setting environment string <SYM>=<VALUE>.
+				// Ignoring "l<datafile>", exporting others:
+				if (*q != 'l') {
+					var[0] = *q++;
+					xsetenv(var, q);
+				}
+				// next line, plz!
+				q = p;
+			}
+			// we are the helper, we wanna be silent.
+			// this call reopens stdio fds to "/dev/null"
+			// (no daemonization is done)
+			bb_daemonize_or_rexec(DAEMON_DEVNULL_STDIO | DAEMON_ONLY_SANITIZE, NULL);
+			BB_EXECVP(*argv, argv);
+			exit(127); // it IS error if helper cannot be executed!
 		}
 	} // while (1)
 
