|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T r
Length: 814 (0x32e) Types: TextFile Names: »remdir.c«
└─⟦9ae75bfbd⟧ Bits:30007242 EUUGD3: Starter Kit └─⟦3658e588a⟧ »EurOpenD3/mail/mh/mh-6.7.tar.Z« └─⟦c75e36ecb⟧ └─⟦this⟧ »mh-6.7/sbr/remdir.c«
/* remdir.c - remove a directory */ #include "../h/mh.h" #include <stdio.h> 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; }