Browse Source

s-s-d: Return status_unknown on error reading from the pid file

Otherwise the variable was uninitialized.
Guillem Jover 15 years ago
parent
commit
2ecaea9677
1 changed files with 2 additions and 0 deletions
  1. 2 0
      utils/start-stop-daemon.c

+ 2 - 0
utils/start-stop-daemon.c

@@ -1243,6 +1243,8 @@ do_pidfile(const char *name)
 
 		if (fscanf(f, "%d", &pid) == 1)
 			pid_status = pid_check(pid);
+		else
+			pid_status = status_unknown;
 		fclose(f);
 
 		if (pid_status == status_dead)