int mknod(const char *pathname, mode_t mode, dev_t dev);
Specifies the name of the new FIFO special file. The path name must specify a path under the fifos subdirectory of the NuTCRACKER Platform installation directory. You can use the
_NutQueryRootDir()function to obtain this path.
Specifies the what access modes the FIFO special file has when it is created, and must have the S_IFIFO flag set in it as well, to indicate that a FIFO special file is being created. Refer to the documentation for
stat()for a discussion of access mode flags.
Search permission is denied on a component of the path prefix or write permission is denied on the parent directory of the file to be created.
The named file already exists.
pathname does not specify a path under the fifos subdirectory of the NuTCRACKER Platform installation directory.
mode indicates a file type other than a FIFO special file.
The length of the path name parameter exceeds PATH_MAX or a path name component is longer than NAME_MAX.
A component of the path name prefix does not exist or pathname points to an empty string.
The directory that contains the new file cannot be extended or the file system is out of file allocation resources.
A component of the path prefix is not a directory.
The named file resides on a read-only file system.
UNIX 98, with exceptions.
The NuTCRACKER Platform requires that FIFOS be created under the fifo subdirectory of the NuTCRACKER Platform installation directory. The following code fragment shows an example of how to establish a valid path:
#include <nutc.h> #include <sys/types.h> #include <sys/stat.h> ... sprintf(path, "%s/fifos/myfifo", _NutQueryRootDir(1)); mknod(path, S_IFIFO | 0666, 0); ...
NuTCRACKER Platform FIFOs appear as regular files to non-NuTCRACKER Platform applications. If a non-NuTCRACKER Platform application writes to a FIFO, the FIFO is corrupted such that it no longer appears as a FIFO to NuTCRACKER Platform applications.
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
- struct stat
PTC MKS Toolkit 10.3 Documentation Build 39.