I'm seeing head return 0 on failures:
$ for tool in head tail cat; do $tool /var/empty/non-existant; print $?; done
head: /var/empty/non-existant: No such file or directory
0
tail: /var/empty/non-existant: No such file or directory
1
cat: /var/empty/non-existant: No such file or directory
1
$ for tool in head tail cat; do $tool /root/non-existant; print $?; done
head: /root/non-existant: Permission denied
0
tail: /root/non-existant: Permission denied
1
cat: /root/non-existant: Permission denied
1
head(1): EXIT STATUS
The head utility exits 0 on success, and >0 if an error occurs.
An ordinary 5.5 release box:
$ uname -mrsv
OpenBSD 5.5 GENERIC#276 i386
Am I doing something wrong?