]>
diplodocus.org Git - nmh/blob - docs/historical/mh-6.8.5/sbr/remdir.c
1 /* remdir.c - remove a directory */
3 static char ident
[] = "@(#)$Id: remdir.c,v 1.5 1992/12/15 00:20:22 jromine Exp $";
13 #if !defined (BSD42) && !defined (SYS5DIR)
15 #endif /* not BSD42 and not SYS5DIR */
18 (void) fflush (stdout
);
20 #if !defined (BSD42) && !defined (SYS5DIR)
21 switch (pid
= vfork ()) {
23 advise ("fork", "unable to");
27 execl ("/bin/rmdir", "rmdir", dir
, NULLCP
);
28 execl ("/usr/bin/rmdir", "rmdir", dir
, NULLCP
);
29 fprintf (stderr
, "unable to exec ");
34 if (pidXwait (pid
, "rmdir"))
38 #else /* BSD42 or SYS5DIR */
39 if (rmdir (dir
) == NOTOK
) {
40 admonish (dir
, "unable to remove directory");
43 #endif /* BSD42 or SYS5DIR */