/*
* makedir.c -- make a directory
*
- * $Id$
- *
* This code is Copyright (c) 2002, by the authors of nmh. See the
* COPYRIGHT file in the root directory of the nmh distribution for
* complete copyright information.
#include <errno.h>
#include <sys/param.h>
#include <sys/file.h>
-
-extern int errno;
int
makedir (char *dir)
nested directories like the above code can.
-- Dan Harkless <dan-nmh@dilvish.speed.net> */
- switch (pid = vfork()) {
+ switch (pid = fork()) {
case -1:
advise ("fork", "unable to");
return 0;
setgid (getgid ());
setuid (getuid ());
- execl ("/bin/mkdir", "mkdir", dir, NULL);
- execl ("/usr/bin/mkdir", "mkdir", dir, NULL);
+ execl ("/bin/mkdir", "mkdir", dir, (void *) NULL);
+ execl ("/usr/bin/mkdir", "mkdir", dir, (void *) NULL);
fprintf (stderr, "unable to exec ");
perror ("mkdir");
_exit (-1);