(rmdir): Use pid_t instead of int; check status

against zero.  This is to improve portability.
This commit is contained in:
Jim Meyering
1999-03-30 04:48:41 +00:00
parent 2080baecff
commit 9dab31b501

View File

@@ -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. */