I learned this the hard way. In Linux, killall kills process by name whereas in Unix System V, killall does what is it is called- kill all processes. killall5 is the SystemV killall command in Linux. If you run killall5 in Linux, it will kill all processes except kernel threads(those surrounded by square bracket in ps aux output) and your login shell.
NAME killall5 -- send a signal to all processes. SYNOPSIS killall5 -signalnumber [-o omitpid] [-o omitpid..] DESCRIPTION killall5 is the SystemV killall command. It sends a signal to all processes except kernel threads and the pro- cesses in its own session, so it won’t kill the shell that is running the script it was called from. Its pri- mary (only) use is in the rc scripts found in the /etc/init.d directory. OPTIONS -o omitpid Tells killall5 to omit processes with that process id.
I also learned that pidof is a symbolic to killall5 and just behaves differently when invoked as pidof. See man pidof.
$ ls -l /sbin/pidof lrwxrwxrwx 1 root root 8 Nov 14 2015 /sbin/pidof -> killall5