Although I like your defensive style, this is probably not a great idea. At least on windows uv_shutdown could fail with UV_EPIPE if the reading end goes away before the shutdown finishes.