diff options
author | Jim Meyering <jim@meyering.net> | 1999-03-30 04:48:41 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1999-03-30 04:48:41 +0000 |
commit | 9dab31b501c12e4d2e2e0ad46622c4ca4e2dfe4c (patch) | |
tree | 11d2ad26de3ea215644173ce5832eb3fc2cf55d5 | |
parent | 2080baecff01175f1fa79e9b38d0eecff22b38e8 (diff) | |
download | coreutils-9dab31b501c12e4d2e2e0ad46622c4ca4e2dfe4c.tar.xz |
(rmdir): Use pid_t instead of int; check status
against zero. This is to improve portability.
-rw-r--r-- | lib/rmdir.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/rmdir.c b/lib/rmdir.c index 58b2edb7d..2a92803db 100644 --- a/lib/rmdir.c +++ b/lib/rmdir.c @@ -44,7 +44,8 @@ int rmdir (dpath) char *dpath; { - int cpid, status; + pid_t cpid; + int status; struct stat statbuf; if (stat (dpath, &statbuf) != 0) @@ -73,7 +74,7 @@ rmdir (dpath) while (wait (&status) != cpid) /* Do nothing. */ ; - if (status & 0xFFFF) + if (status) { /* /bin/rmdir failed. */ |