Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 465ad7b

Browse files
committed
Fix inheritance of console dup'd file descriptors
1 parent 27c6284 commit 465ad7b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Native/Unix/System.Native/pal_io.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ extern "C" int32_t SystemNative_Close(intptr_t fd)
264264
extern "C" intptr_t SystemNative_Dup(intptr_t oldfd)
265265
{
266266
int result;
267-
while (CheckInterrupted(result = dup(ToFileDescriptor(oldfd))));
267+
while (CheckInterrupted(result = fcntl(ToFileDescriptor(oldfd), F_DUPFD_CLOEXEC, 0)));
268268
return result;
269269
}
270270

0 commit comments

Comments
 (0)