Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

unix: sanity-check fds before closing #943

Closed
wants to merge 1 commit into from
Closed

unix: sanity-check fds before closing #943

wants to merge 1 commit into from

Conversation

bnoordhuis
Copy link
Contributor

RFC from @piscisaureus and @saghul.

The idea is to catch a pretty common type of error that we have in node.js, namely closing stdio file descriptors.

It also ties in with nodejs/node-v0.x-archive#6271 where libuv triggers a Linux kernel bug that results in a busy loop.

@@ -43,7 +43,6 @@


static void close_cb(uv_handle_t* handle) {
printf("close_cb\n");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was one of those bugs: calling printf() after fd 1 is closed.

@saghul
Copy link
Contributor

saghul commented Oct 1, 2013

LGTM 👍

@bnoordhuis bnoordhuis closed this Oct 1, 2013
@bnoordhuis
Copy link
Contributor Author

Thanks @saghul, landed in 359d667.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants