[DragonFlyBSD - Bug #3283] (New) mknodat() cannot create FIFOs
bugtracker-admin at leaf.dragonflybsd.org
bugtracker-admin at leaf.dragonflybsd.org
Mon Jun 14 08:42:06 PDT 2021
Issue #3283 has been reported by bhaible.
----------------------------------------
Bug #3283: mknodat() cannot create FIFOs
http://bugs.dragonflybsd.org/issues/3283
* Author: bhaible
* Status: New
* Priority: Normal
* Assignee:
* Category: Userland
* Target version:
----------------------------------------
According to POSIX https://pubs.opengroup.org/onlinepubs/9699919799/functions/mknodat.html
mknodat(AT_FDCWD, filename, mode | S_IFIFO, 0)
should create a FIFO, just like
mkfifoat(AT_FDCWD, filename, mode)
But mknodat fails with EINVAL instead.
How to reproduce: Run this program.
It prints:
<pre>
mknodat: Invalid argument
</pre>
<pre>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <sys/stat.h>
int main ()
{
int ret = mkfifoat (AT_FDCWD, "fifo1", 0600);
if (ret < 0)
perror ("mkfifoat");
ret = mknodat (AT_FDCWD, "fifo2", 0600 | S_IFIFO, 0);
if (ret < 0)
perror ("mknodat");
}
</pre>
--
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account
More information about the Bugs
mailing list