mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 10:12:39 +01:00
ircd: fix a really retarded GCC warning by being anal retentively "standards compliant"
This commit is contained in:
parent
36e803d93a
commit
c084fcafec
1 changed files with 9 additions and 1 deletions
10
ircd/ircd.c
10
ircd/ircd.c
|
@ -174,7 +174,15 @@ print_startup(int pid)
|
|||
/* let the parent process know the initialization was successful
|
||||
* -- jilles */
|
||||
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)
|
||||
abort();
|
||||
if (dup2(1, 2) == -1)
|
||||
|
|
Loading…
Reference in a new issue