Use <sys/types.h> for types in <unistd.h>
POSIX-compliant alarm()

Return value of alarm() is 0 if no pending alarm, else the number of
seconds until a pending alarm would have gone off.

alarm(0) cancels an previously scheduled alarm, if one is pending.