if I keep this line it always returns EAGAIN in error code.