Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4114,10 +4114,11 @@ inline void PlatformInit() {
continue;
// Anything but EBADF means something is seriously wrong. We don't
// have to special-case EINTR, fstat() is not interruptible.
// if (errno != EBADF)
// ABORT();
if (fd != open("/dev/null", O_RDWR))
if (errno != EBADF)
ABORT();
open("/dev/null", O_RDWR);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should make sure that this open return current loop fd (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback. Yes, no doubt. This is not intended to be merged. That's what the WIP (work in progress) and the in progress label are meant to indicate. Trying some non-intuitive (and quite possibly ignorant) things to try to figure out why this bit of code seems to be not working (or perhaps the associated test is what is not working) on AIX but working on all the other POSIX systems we test on.

@veshboo veshboo Sep 6, 2016

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this related to "AIX: parallel/test-stdio-closed #8375".

On AIX, I remember that there is a kernel parameter regarding max number of pseudo terminals allowed in the system. I suspect the issue is somehow related to the kernel parameter. Need to check the "errno" when the test fails.

EDIT: seems not directly related to pty because the path to open is "/dev/null".

// if (fd != open("/dev/null", O_RDWR))
// ABORT();
}

CHECK_EQ(err, 0);
Expand Down