No news is good news, which, sticking with the normal convention should return 0. Why doeshostname -h return 255, especially when, 255 by convention, is meant to mean Exit status out of range
Why does hostname -h return 255
hostname
hostname -h does not return 255 on my RHEL machine.it does return error 4 which make sensehostname -hUsage: hostname [-v] {hostname|-F file}      set hostname (from file)........echo $?4If you take a look at hostname.c from net-utils you will clearly see that:static void usage(void){    fprintf(stderr, _(Usage: hostname [-v] {hostname|-F file}      set hostname (from file)\n));........  exit(4); /* E_USAGE */}and reference to usage() in here in the same file:........    case '?':    case 'h':    default:        usage();    };So i am not really sure why you are getting 255, on MAC version you might get 1, but i never seen 255.EDIT you are right, i've just looked at fedora19 and hostname comes from hostname RPMand indeed for usage they do return 255:voidusage(FILE *stream){        fprintf(stream,..... exit(-1);};So here I will try to explain your confusion.Well, first doing exit(-1) there is a mistake by a programmer, at least for POSIX environment, since in such OS anything that not 0 in exit status considered FAILURE, but:What about the exit() function found in the standard C library?Its manpage tells us that the exit() function causes normal process termination and the value of status & 0377 is returned to the parent. Now, status & 0377? What does that mean? Well, 0377 is 377 in octal, which is 255 in decimal, or 0xFF in hexadecimal.#include <stdlib.h>void exit(int status);So, if exit takes a signed argument, but returns a 0xFF masked one to its parent( which is shell), and -1 is represented as all ones in twos-complement, this only means that the value the shell is going to see and, thus, $? is going to store  = 0xffRecall that 0xff is 255, and thats pretty much it.Even if programmer is aware that all user will get is 255 when he calls exit(-1), it is a poor habit to do that while programming in POSIX environment. The code will eventually reach someone that will misunderstand the meaning of the -1(255) argument and raise a question like you(OP) did.Hope this helps.