summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ec316aa)
If we didn't read any number from a pid file, we'll return
an unitialized variable to the caller, and it will treat
that garbage as a pid of a process (possible to kill).
Fix that.
pid_t read_pid (char *pidfile)
{
FILE *f;
pid_t read_pid (char *pidfile)
{
FILE *f;
if (!(f=fopen(pidfile,"r")))
return 0;
if (!(f=fopen(pidfile,"r")))
return 0;