mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:07:35 +00:00
LibC: add mkfifo(3)
This commit is contained in:
parent
b9619989dd
commit
82ba7d546a
2 changed files with 7 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue