flock: Check for waitpid() error

This commit is contained in:
sin 2015-12-21 14:12:09 +00:00
parent 0c3440253b
commit 00d7bf4ea5

View File

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