kill() might overwrite errno. Save it beforehand