Merge "Handle errno properly to avoid corrupt str_parms"