library/src/filesystem/BP-Fifos.cc
// creates a new fifo on the filesystem and opens it for read/write
// operations.
creates a new fifo on the filesystem and opens it for read/write
operations.
creates a new fifo on the filesystem and opens it for read / write operations .
FILE * BP_FifoCreate(char *rootDirPath)
{
	if(!rootDirPath)
		return NULL;
	if(!BP_StringIsReasonableForUnixEXT4Directory(rootDirPath, bpstrlen(rootDirPath), BP_FALSE))
		return NULL;
	FILE *fifo = NULL;
	int err = 0;
	err = mkfifo(rootDirPath, S_IREAD | S_IWRITE);
	if(err == EEXIST || err == ENOSPC || EROFS)
		return NULL;
	fifo = BP_FifoOpen(rootDirPath);
	return fifo;
}
FILE * BP_FifoCreate ( char * rootDirPath ) { if ( ! rootDirPath ) return NULL ; if ( ! BP_StringIsReasonableForUnixEXT4Directory ( rootDirPath , bpstrlen ( rootDirPath ) , BP_FALSE ) ) return NULL ; FILE * fifo = NULL ; int err = 0 ; err = mkfifo ( rootDirPath , S_IREAD | S_IWRITE ) ; if ( err == EEXIST || err == ENOSPC || EROFS ) return NULL ; fifo = BP_FifoOpen ( rootDirPath ) ; return fifo ; }
creates a new fifo on the filesystem and opens it for read/write
operations.
creates a new fifo on the filesystem and opens it for read / write operations .
// make fifo read/write