Commit 4438bf41 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Allow a single '\n' after the PID

parent ad5d4de5
......@@ -89,6 +89,8 @@ VPF_read(const char *path, pid_t *pidptr)
return (error);
else if (i == 0)
return (EAGAIN);
if (i > 0 && buf[i - 1] == '\n')
i--;
buf[i] = '\0';
*pidptr = strtol(buf, &endptr, 10);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment