From: Richard M. Stallman Date: Tue, 20 Jun 1995 00:00:14 +0000 (+0000) Subject: (rmdir): Fix up Aug 19 1993 change that wasn't done right. X-Git-Tag: emacs-19.34~3533 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f560db785ef4ee6f6ef740e87c6ed8d23f252adb;p=emacs.git (rmdir): Fix up Aug 19 1993 change that wasn't done right. --- 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;