Bug#43998: start-stop-daemon doesn't seem to work with some pidfiles
On Thu, 2 Sep 1999, Martijn Vernooy wrote:
> Package: dpkg
> Version: 1.4.1.6
>
> 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)
check(pid);
fclose(f);
}
}
So if the pidfile doesn't exist, it won't be created.
Matthew
Reply to: