summaryrefslogtreecommitdiff
path: root/src/sysdep.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-06-20 00:00:14 +0000
committerRichard M. Stallman <rms@gnu.org>1995-06-20 00:00:14 +0000
commit65733f9781191dc3e03682bd8e5059a8b5f8e6fd (patch)
tree8425cdc473b67c63dcf3f18a36eb489835313407 /src/sysdep.c
parent37d2040807aa8ce8671fab0c235d0300efb73ab9 (diff)
downloademacs-65733f9781191dc3e03682bd8e5059a8b5f8e6fd.tar.gz
(rmdir): Fix up Aug 19 1993 change that wasn't done right.
Diffstat (limited to 'src/sysdep.c')
-rw-r--r--src/sysdep.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/sysdep.c b/src/sysdep.c
index 13417ed04e2..be412e2385d 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -3584,17 +3584,17 @@ rmdir (dpath)
dup2 (fd, 1);
dup2 (fd, 2);
}
- wait_for_termination (cpid);
- if (synch_process_death != 0 || synch_process_retcode != 0)
- return -1; /* /bin/rmdir failed */
+ execl ("/bin/rmdir", "rmdir", dpath, (char *) 0);
+ _exit (-1); /* Can't exec /bin/rmdir */
+
default: /* Parent process */
- while (cpid != wait (&status)); /* Wait for kid to finish */
+ wait_for_termination (cpid);
}
- if (WIFSIGNALED (status) || WEXITSTATUS (status) != 0)
+ if (synch_process_death != 0 || synch_process_retcode != 0)
{
errno = EIO; /* We don't know why, but */
- return -1; /* /bin/mkdir failed */
+ return -1; /* /bin/rmdir failed */
}
return 0;