# HG changeset patch # User Richard M. Stallman # Date 803606414 0 # Node ID b99947e6b4478755c124daaf44583ff8191403aa # Parent aa6fc4e97a283e860549c20890672dd93afc62cf (rmdir): Fix up Aug 19 1993 change that wasn't done right. diff -r aa6fc4e97a28 -r b99947e6b447 src/sysdep.c --- 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;