minishell icon indicating copy to clipboard operation
minishell copied to clipboard

[TODO] Change to `perror()` for systemcall error, where possible

Open itislu opened this issue 1 year ago • 0 comments

The argument to perror() gets printed first, so most of the time it should be our PROGRAM_NAME, like so:

perror(PROGRAM_NAME)

IMPORTANT

If an error occurred, no other system call should be called before perror(), otherwise errno could get updated and the output would be incorrect.

itislu avatar Jan 14 '24 19:01 itislu