+ pid = waitpid(pid, &status, 0);
+ while (pid == -1 && errno == EINTR);
+ if (pid < 0) {
+ PARA_ERROR_LOG("%s\n", strerror(errno));
+ goto fail;
+ }
+ if (!WIFEXITED(status) || WEXITSTATUS(status) != 0)
+ goto fail;
+ return;
+fail:
+ PARA_EMERG_LOG("command \"%s\" failed\n", cmd);
+ exit(EXIT_FAILURE);