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

Bug#43998: start-stop-daemon doesn't seem to work with some pidfiles

On Thu, 2 Sep 1999, Martijn Vernooy wrote:

> Package: dpkg
> Version:
> When start-stop-daemon is invoked with the --pidfile option and --start,
> it doesn't seem to write the pid of the started process to the file if
> the filename of the pidfile is /var/run/xdm.pid .It does if the filename
> of the pidfile is /var/run/xdm-pid .

This is because xdm-pid already exists on Debian systems, whereas xdm.pid
does not.

The pidfile is open here:

static void
do_pidfile(const char *name)
	FILE *f;
	int pid;

	f = fopen(name, "r");
	if (f) {
		if (fscanf(f, "%d", &pid) == 1)

So if the pidfile doesn't exist, it won't be created. 


Reply to: