zcip: make it work on NOMMU (+ improve NOMMU support machinery)

fsck: fix bad English in a comment
This commit is contained in:
Denis Vlasenko
2007-03-26 17:25:33 +00:00
parent 4e1361a481
commit afa7023b46
6 changed files with 102 additions and 90 deletions

View File

@@ -192,9 +192,16 @@ int wait4pid(int pid)
{
int status;
if (pid == -1 || waitpid(pid, &status, 0) == -1) return -1;
if (WIFEXITED(status)) return WEXITSTATUS(status);
if (WIFSIGNALED(status)) return WTERMSIG(status);
if (pid <= 0) {
errno = ECHILD;
return -1;
}
if (waitpid(pid, &status, 0) == -1)
return -1;
if (WIFEXITED(status))
return WEXITSTATUS(status);
if (WIFSIGNALED(status))
return WTERMSIG(status) + 10000;
return 0;
}