Skip to content
Snippets Groups Projects
Commit 5942e911 authored by Tristan Matthews's avatar Tristan Matthews
Browse files

fileutils: cleanup

parent fb3fb8c1
No related branches found
No related tags found
No related merge requests found
......@@ -83,7 +83,9 @@ bool create_pidfile()
std::string pidfile = path + "/" PIDFILE;
FILE *fp = fopen(pidfile.c_str(),"r");
if (fp) { // PID file exists. Check the former process still alive or not. If alive, give user a hint.
if (fp) {
// PID file exists. Check if the former process is still alive or
// not. If alive, give user a hint.
int oldPid;
if (fscanf(fp, "%d", &oldPid) != 1) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment