Gaël Thomas
Mathieu Bacou
ls
cp
X
gnome
You must always test the return value of a system call and deal with errors
Prevent the propagation of errors (the discovery of the error can take place much later)
see the fail-fast approach presented in CSC4102
errno: external variable indicating the cause of the last error
errno
The ERRORS section in a function manual describes the possible causes of error.
ERRORS
sp
rbp
ra
strcpy
gets
strncpy
fgets
-fstack-protector-all
syscall
ecall