ircd: fix a really retarded GCC warning by being anal retentively "standards compliant"

This commit is contained in:
Elizabeth Myers 2016-03-18 15:53:43 -05:00
parent 36e803d93a
commit c084fcafec

View file

@ -174,7 +174,15 @@ print_startup(int pid)
/* let the parent process know the initialization was successful /* let the parent process know the initialization was successful
* -- jilles */ * -- jilles */
if (!server_state_foreground) if (!server_state_foreground)
write(0, ".", 1); {
if(write(0, ".", 1) < 1)
/* The circumstances in which this could fail are pretty implausible.
* However, this shuts GCC up about warning the result of write is unused,
* and is "standards compliant" behaviour.
* --Elizabeth
*/
abort();
}
if (dup2(1, 0) == -1) if (dup2(1, 0) == -1)
abort(); abort();
if (dup2(1, 2) == -1) if (dup2(1, 2) == -1)