changeset 12326:b99947e6b447

(rmdir): Fix up Aug 19 1993 change that wasn't done right.
author Richard M. Stallman <rms@gnu.org>
date Tue, 20 Jun 1995 00:00:14 +0000
parents aa6fc4e97a28
children 2a02456ddc4b
files src/sysdep.c
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/sysdep.c	Mon Jun 19 23:20:42 1995 +0000
+++ b/src/sysdep.c	Tue Jun 20 00:00:14 1995 +0000
@@ -3584,17 +3584,17 @@
 	  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;