head 1.5; access; symbols; locks; strict; comment @ * @; 1.5 date 92.12.15.00.20.22; author jromine; state Exp; branches; next 1.4; 1.4 date 90.04.05.15.31.28; author sources; state Exp; branches; next 1.3; 1.3 date 90.04.05.14.45.48; author sources; state Exp; branches; next 1.2; 1.2 date 90.02.05.14.39.39; author sources; state Exp; branches; next 1.1; 1.1 date 90.02.05.14.38.59; author sources; state Exp; branches; next ; desc @@ 1.5 log @endif sugar @ text @/* remdir.c - remove a directory */ #ifndef lint static char ident[] = "@@(#)$Id: remdir.c,v 1.4 1990/04/05 15:31:28 sources Exp jromine $"; #endif lint #include "../h/mh.h" #include remdir (dir) char *dir; { #if !defined (BSD42) && !defined (SYS5DIR) int pid; #endif /* not BSD42 and not SYS5DIR */ m_update (); (void) fflush (stdout); #if !defined (BSD42) && !defined (SYS5DIR) switch (pid = vfork ()) { case NOTOK: advise ("fork", "unable to"); return 0; case OK: execl ("/bin/rmdir", "rmdir", dir, NULLCP); execl ("/usr/bin/rmdir", "rmdir", dir, NULLCP); fprintf (stderr, "unable to exec "); perror ("rmdir"); _exit (-1); default: if (pidXwait (pid, "rmdir")) return 0; break; } #else /* BSD42 or SYS5DIR */ if (rmdir (dir) == NOTOK) { admonish (dir, "unable to remove directory"); return 0; } #endif /* BSD42 or SYS5DIR */ return 1; } @ 1.4 log @add ID @ text @d3 1 a3 1 static char ident[] = "@@(#)$Id:$"; d15 1 a15 1 #endif not BSD42 and not SYS5DIR d38 1 a38 1 #else BSD42 or SYS5DIR d43 1 a43 1 #endif BSD42 or SYS5DIR @ 1.3 log @add ID @ text @d3 1 a3 1 static char ident[] = "$Id:"; @ 1.2 log @SYS5DIR routines @ text @d2 3 @ 1.1 log @Initial revision @ text @d10 1 a10 1 #ifndef BSD42 d12 1 a12 1 #endif not BSD42 d17 1 a17 1 #ifndef BSD42 d35 1 a35 1 #else BSD42 d40 1 a40 1 #endif BSD42 @