Update luv.c

Fixed Broken pipe issue.