|
|
MPE/iX Developer's Kit Reference Manual Volume I: HP 3000 MPE/iX Computer Systems > Chapter 4
POSIX/iX Library Function Descriptions
mknod |
|
Make a FIFO special file. Makes a directory, or a special or regular file.
mknod() creates a new file named by the path name pointed to by path. The mode of the new file is specified by the mode argument. Symbolic constants defining the file type and file access permission bits are found in the <sys/stat.h> header file and are used to construct the mode argument. The value of the mode argument should be the bit-wise inclusive OR of the values of the desired file type, miscellaneous mode bits, and access permissions. See stat(5) for a description of the components of the file mode. The owner ID of the file is set to the effective-user-ID of the process. If the set-group-ID bit of the parent directory is set, the new file's group ID is set to the group ID of the parent directory. Otherwise, the new file's group ID is set to the effective-group-ID of the process. The file access permission bits of mode are modified by the process's file mode creation mask: for each bit set in the process's file mode creation mask, the corresponding bit in the file's mode is cleared (see umask(2)). The new file is created with three base access-control-list (ACL) entries, corresponding to the file access permission bits. The dev argument is meaningful only if mode indicates a block or character special file, and is ignored otherwise. It is an implementation- and configuration-dependent specification of a character or block I/O device. The value of dev is created by using the makedev() macro defined in <sys/mknod.h>. The makedev() macro takes as arguments the major and minor device numbers, and returns a device identification number which is of type dev_t. The value and interpretation of the major and minor device numbers are implementation-dependent. For more information, see mknod(5) and the System Administration manuals for your system. Only users with appropriate privileges can invoke mknod for file types other than FIFO files. Proper discretion should be used when using mkrnod to create generic device files in an HP Clustered Environment. A generic device file accessed from different cnodes in a cluster applies to different physical devices. Thus the file's ownership and permissions might not be appropriate in the context of every individual cnode in the cluster. If an error occurs, errno is set to one of the following values:
|
|