The above code block outputs "0". If $? is defined as, "Expands to the status of the most recently executed foreground pipeline," can you define exactly why the output is "0"?
$? in shell is just like errno in C and all those weird built-in variables in Perl: If you need it, save it to a different variable first. Always. GCC should have a -Werrno switch that complains if errno is used for anything but assigning it to something else.
Comments
http://beranger.org/index.php?page=diar
GCC should have a -Werrno switch that complains if errno is used for anything but assigning it to something else.