Stop as soon as stdout is closed

Even if stdin is alive or if we have chunks to write, we always want to
detect and stop if stdout is closed.

Thus, we always poll stdout, so it will interrupt any poll() call.