I would like to use mknod
in my code to create a file, but man
says, that
The only portable use of mknod() is to create a FIFO-special file. If mode is not S_IFIFO or dev is not 0, the behavior of mknod() is unspecified.
Does that mean, that mknod is not really portable and I should use some other way to create a function? How about calling open
and the instantly close
? Which way is safer?