| MKNOD(2V) | 21 January 1990 | MKNOD(2V) |
| NAME |
| mknod, mkfifo - make a special file |
| SYNOPSIS |
|
|
| DESCRIPTION |
|
mknod() creates a new file named by the path name pointed to by path. The mode of the new file (including file type bits) is initialized from mode. The values of the file type bits which are permitted are:
Values of mode other than those above are undefined and should not be used. The access permissions of the mode are modified by the process's mode mask (see umask(2V)). The owner ID of the file is set to the effective user ID of the process. The group ID of the file is set to either:
If mode indicates a block or character special file, dev is a configuration dependent specification of a character or block I/O device. If mode does not indicate a block special or character special device, dev is ignored. mknod() may be invoked only by the super-user for file types other than FIFO special. mkfifo() creates a new FIFO special file named by the pathname pointed to by path. The access permissions of the new FIFO are initialized from mode. The access permissions of mode are modified by the process's file creation mask, see umask(2V). Bits in mode other than the access permissions are ignored. The FIFO's owner ID is set to the process's effective user ID. The FIFO's group ID is set to the group ID of the directory in which the FIFO is being created or to the process's effective group ID. Upon successful completion, the mkfifo() function marks for update the st_atime, st_ctime, and st_mtime fields of the file. Also, the st_ctime and st_mtime fields of the directory that contains the new entry are marked for update. |
| RETURN |
|
mknod() returns:
mkfifo() returns:
|
| ERRORS |
|
mknod() fails and the file mode remains unchanged if:
mkfifo() may set errno to:
|
| SEE |
| MKNOD(2V) | 21 January 1990 | MKNOD(2V) |