Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bgipc_part_0500_fifos.md: mknod is used instead of mkfifo #11

Open
ZoomRmc opened this issue Feb 17, 2024 · 0 comments
Open

bgipc_part_0500_fifos.md: mknod is used instead of mkfifo #11

ZoomRmc opened this issue Feb 17, 2024 · 0 comments

Comments

@ZoomRmc
Copy link

ZoomRmc commented Feb 17, 2024

I noticed that the guide promotes the use of mknod instead of mkfifo for creating the FIFOs, which contradicts the POSIX and the common advice I've seen. mkfifo isn't even mentioned as an alternative call.

Is there a specific reason, like difference in portability?

The POSIX standard states:

The mkfifo() function is preferred over this function for making FIFO special files.

The Linux manual for mknod also quotes POSIX.1-2001:

"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." However, nowadays one should never use mknod() for this purpose; one should use mkfifo(3), a function especially defined for this purpose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant