Project

General

Profile

Actions

Bug #3283

open

mknodat() cannot create FIFOs

Added by bhaible over 3 years ago. Updated over 3 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Userland
Target version:
Start date:
06/14/2021
Due date:
% Done:

0%

Estimated time:

Description

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:

mknodat: Invalid argument


#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");
}

Actions #1

Updated by tuxillo over 3 years ago

  • Target version set to 6.2
Actions

Also available in: Atom PDF