proc: consume all data after the pipe dies, instead of looping with 100% cpu usage