aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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)
3584 dup2 (fd, 1); 3584 dup2 (fd, 1);
3585 dup2 (fd, 2); 3585 dup2 (fd, 2);
3586 } 3586 }
3587 wait_for_termination (cpid); 3587 execl ("/bin/rmdir", "rmdir", dpath, (char *) 0);
3588 if (synch_process_death != 0 || synch_process_retcode != 0) 3588 _exit (-1); /* Can't exec /bin/rmdir */
3589 return -1; /* /bin/rmdir failed */ 3589
3590 default: /* Parent process */ 3590 default: /* Parent process */
3591 while (cpid != wait (&status)); /* Wait for kid to finish */ 3591 wait_for_termination (cpid);
3592 } 3592 }
3593 3593
3594 if (WIFSIGNALED (status) || WEXITSTATUS (status) != 0) 3594 if (synch_process_death != 0 || synch_process_retcode != 0)
3595 { 3595 {
3596 errno = EIO; /* We don't know why, but */ 3596 errno = EIO; /* We don't know why, but */
3597 return -1; /* /bin/mkdir failed */ 3597 return -1; /* /bin/rmdir failed */
3598 } 3598 }
3599 3599
3600 return 0; 3600 return 0;