flock: Check for waitpid() error

This commit is contained in:
sin 2015-12-21 14:12:09 +00:00
parent 0c3440253b
commit 00d7bf4ea5
1 changed files with 2 additions and 1 deletions

View File

@ -67,7 +67,8 @@ main(int argc, char *argv[])
default:
break;
}
waitpid(pid, &status, 0);
if (waitpid(pid, &status, 0) < 0)
eprintf("waitpid:");
if (close(fd) < 0)
eprintf("close:");