>> Checking the return value is good, but why not hard-code the
>> STDOUT_FILENO? It can't change, and everybody knows what "1" means,
>> and it's shorter.
> exit()ing with 0 is basically the same thing, but I'd ever use
> EXIT_SUCCESS (which of course is defined to 0).
EXIT_SUCCESS was put into the C standard because of VMS (where normal
Unix return values are mapped to various threatening messages). After
lobbying the standard committee, the VMS folks went and implemented
normal POSIX semantics for exit anyway. AFAIK, there's no reason
whatsoever to use EXIT_SUCCESS.
> So if there's a define for something, I tend to use instead of
> whatever hardcoded value should be well-known by anybod[y] :-)
If de gustibus non disputandum, what are we going to be disputandum about?
> Maybe I'd split the patch into two and then continue discussion?
Please do.
Juliusz
|