Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: 'UID=42 whoami' proceeds despite error



On Dec 2, 12:08pm, Daniel Shahaf wrote:
}
} +    if (setuid((uid_t)x)) {
}  	zwarn("failed to change user ID: %e", errno);
} +	errflag |= ERRFLAG_ERROR;
} +    }

This is the wrong way to do this.  Just call zerr() instead of zwarn().



Messages sorted by: Reverse Date, Date, Thread, Author