diff options
author | Kenneth Myhra <kennethmyhra@gmail.com> | 2022-01-17 10:04:00 +0100 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2022-01-24 14:01:58 +0330 |
commit | c10abd6be2d951c8d0649c975b0133ea808e507f (patch) | |
tree | d4fdcca6bf2d50516c1f6e048f0f81d79d76c2de | |
parent | 3af7a5dd61be123d86bfa2ab2c9d586a6510e6a8 (diff) | |
download | serenity-c10abd6be2d951c8d0649c975b0133ea808e507f.zip |
LibCore: Add mkfifo() syscall wrapper
-rw-r--r-- | Userland/Libraries/LibCore/System.cpp | 5 | ||||
-rw-r--r-- | Userland/Libraries/LibCore/System.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/Userland/Libraries/LibCore/System.cpp b/Userland/Libraries/LibCore/System.cpp index 3bb1c698fd..244a09a821 100644 --- a/Userland/Libraries/LibCore/System.cpp +++ b/Userland/Libraries/LibCore/System.cpp @@ -945,4 +945,9 @@ ErrorOr<void> mknod(StringView pathname, mode_t mode, dev_t dev) #endif } +ErrorOr<void> mkfifo(StringView pathname, mode_t mode) +{ + return mknod(pathname, mode | S_IFIFO, 0); +} + } diff --git a/Userland/Libraries/LibCore/System.h b/Userland/Libraries/LibCore/System.h index fb6ba508ed..1583e76fb8 100644 --- a/Userland/Libraries/LibCore/System.h +++ b/Userland/Libraries/LibCore/System.h @@ -136,5 +136,6 @@ ErrorOr<void> getpeername(int sockfd, struct sockaddr*, socklen_t*); ErrorOr<void> socketpair(int domain, int type, int protocol, int sv[2]); ErrorOr<Vector<gid_t>> getgroups(); ErrorOr<void> mknod(StringView pathname, mode_t mode, dev_t dev); +ErrorOr<void> mkfifo(StringView pathname, mode_t mode); } |