From d1328639b42df8aa023e764d34c751d46d4342d9 Mon Sep 17 00:00:00 2001 From: Karol Kosek Date: Mon, 22 May 2023 09:22:10 +0200 Subject: [PATCH] mkfifo: Don't rely on global errno Core::System::mkfifo() doesn't rely on POSIX's mkfifo() and sends the syscall directly to our system. This means that the and errno doesn't get updated which ultimately caused the program to display an incorrect message 'mkfifo: Success (not an error)'. --- Userland/Utilities/mkfifo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Utilities/mkfifo.cpp b/Userland/Utilities/mkfifo.cpp index 4d48426bfc8..35e7a489389 100644 --- a/Userland/Utilities/mkfifo.cpp +++ b/Userland/Utilities/mkfifo.cpp @@ -33,7 +33,7 @@ ErrorOr serenity_main(Main::Arguments arguments) for (auto path : paths) { auto error_or_void = Core::System::mkfifo(path, mode); if (error_or_void.is_error()) { - perror("mkfifo"); + warnln("mkfifo: Couldn't create fifo '{}': {}", path, error_or_void.error()); exit_code = 1; } }