[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#209355: dpkg: start-stop-daemon printing (null) as process-name



Package: dpkg
Version: 1.10.10
Severity: minor

When using start-stop-daemon with the --start, --startas and --pidfile
arguments, it does not know the execname.
However, if the daemon is already running, it prints something along
the lines of:

Starting Braille terminal driver: (null) already running.

This looks sort of buggy.  Reason being that printf is passed a NULL string
pointer.  A proposed patch is below.  When used in the typical
init-script, it will produce this result:

Starting Braille terminal driver: process already running.

--- dpkg-1.10.10/utils/start-stop-daemon.c.orig	2003-09-09 15:44:04.000000000 +0200
+++ dpkg-1.10.10/utils/start-stop-daemon.c	2003-09-09 15:39:11.000000000 +0200
@@ -1162,7 +1162,7 @@
 
 	if (found) {
 		if (quietmode <= 0)
-			printf("%s already running.\n", execname);
+			printf("%s already running.\n", execname ? execname : "process");
 		exit(exitnodo);
 	}
 	if (testmode) {

-- System Information
Debian Release: testing/unstable
Kernel Version: Linux lexx 2.4.19 #1 Thu Aug 29 15:11:07 CEST 2002 i686 GNU/Linux

Versions of the packages dpkg depends on:
ii  dselect        1.10.10        a user tool to manage Debian packages
ii  libc6          2.3.2-2        GNU C Library: Shared libraries and Timezone

-- 
CYa,
  Mario | Debian Developer <URL:http://debian.org/>
        | Get my public key via finger mlang@db.debian.org
        | 1024D/7FC1A0854909BCCDBE6C102DDFFC022A6B113E44



Reply to: