errcode expected in exec may be undefined, so sockio disconnection must be handled differently