minishell
minishell copied to clipboard
[TODO] Change to `perror()` for systemcall error, where possible
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.