int mkfifo(const char *pathname, mode_t mode);
The owner ID of the FIFO is set to the effective user ID of the process. The FIFO group ID is set to the effective group ID of the process.
Specifies the name of the new FIFO. 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 which access modes the FIFO has when it is 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.
The length of the pathname 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.
POSIX.1 (1996), with exceptions.
The NuTCRACKER Platform requires that FIFOS be created under the fifos 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)); mkfifo(path, 0666); ...
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.4 Documentation Build 39.