================ @@ -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. ---------------- jyknight wrote:
Does wasi have /dev/null? If not, this whole function is pointless. If so, that could be opened directly, instead. Actually, given the number of changes here for wasi, shouldn't wasi just have its own llvm/lib/Support/WASI/Process.inc file? https://github.com/llvm/llvm-project/pull/92677 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits