1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 10:27:35 +00:00

LibC: add mkfifo(3)

This commit is contained in:
Peter Elliott 2020-07-16 16:01:03 -06:00 committed by Andreas Kling
parent b9619989dd
commit 82ba7d546a
2 changed files with 7 additions and 0 deletions

View file

@ -30,6 +30,7 @@
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
extern "C" {
@ -63,4 +64,9 @@ int fchmod(int fd, mode_t mode)
int rc = syscall(SC_fchmod, fd, mode);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
int mkfifo(const char* pathname, mode_t mode)
{
return mknod(pathname, mode | S_IFIFO, 0);
}
}