MKDIR(2)                         System Calls                         MKDIR(2)




NAME

       mkdir - make a directory file


SYNOPSIS

       #include <sys/stat.h>

       GNO:      int mkdir (const char *path);
       POSIX:    int mkdir (const char *path, mode_t mode);


DESCRIPTION

       The  directory path is created with the access permissions specified by
       mode and restricted by the the umask(2) of the calling process.

       The directory's owner ID is set to the  process's  effective  user  ID.
       The  directory's  group  ID  is  set to that of the parent directory in
       which it is created.


RETURN VALUES

       A 0 return value indicates success.  A -1 return value indicates an er‐
       ror, and an error code is stored in errno.


BUGS

       The  GNO  implementation does not take a mode parameter.  Attempting to
       provide one will cause stack errors.  The implementation should  proba‐
       bly be changed to accept such a parameter.


SEE ALSO

       chmod(2), stat(2), umask(2)


STANDARDS

       Because  of the missing mode parameter in the GNO implementation, mkdir
       does not conform to IEEE Std 1003.1-1988 (POSIX).



GNO                             22 January 1997                       MKDIR(2)

Man(1) output converted with man2html