[clang] [lld] [llvm] Conditionalize use of POSIX features missing on WASI/WebAssembly (PR #92677)

via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 14 17:51:27 PDT 2024


================
@@ -252,13 +257,21 @@ std::error_code Process::FixupStandardFileDescriptors() {
 
     if (NullFD == StandardFD)
       FDC.keepOpen();
+#if defined(__wasi__)
+    else // WASI does not have `dup2` by design. Return EBADF.
----------------
whitequark wrote:

No, no `/dev/null`.

https://github.com/llvm/llvm-project/pull/92677


More information about the llvm-commits mailing list