diff --git a/Userland/Libraries/LibIPC/Decoder.cpp b/Userland/Libraries/LibIPC/Decoder.cpp index 5176d6ab12..8b1ec84053 100644 --- a/Userland/Libraries/LibIPC/Decoder.cpp +++ b/Userland/Libraries/LibIPC/Decoder.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -175,6 +176,10 @@ bool Decoder::decode([[maybe_unused]] File& file) dbgln("recvfd: {}", strerror(errno)); return false; } + if (fcntl(fd, F_SETFD, FD_CLOEXEC) < 0) { + dbgln("fcntl(F_SETFD, FD_CLOEXEC)", strerror(errno)); + return false; + } file = File(fd, File::ConstructWithReceivedFileDescriptor); return true; #else