#42471: Don't try to write log messages to the TCP listener file descriptor Open Date: 2021-06-05 07:43 Last Update: 2021-06-05 07:47 URL for this Ticket: https://osdn.net//projects/freeciv/ticket/42471 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=42471 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2021-06-05 07:47 Updated by: gunnarbeutner * Type Update from Bugs to Patches --------------------------------------------------------------------- Ticket Status: Reporter: gunnarbeutner Owner: (None) Type: Patches Status: Open Priority: 5 - Medium MileStone: (None) Component: (None) Severity: 5 - Medium Resolution: None --------------------------------------------------------------------- Ticket details: When starting a new game from the main menu the client spawns an instance of freeciv-server. When no --log argument was specified for the client the logfile variable is NULL and client_start_server ends up closing stdout and stderr without opening any file to replace them. The next file descriptor that is allocated happens to belong to the TCP listener. lsof for the server process: freeciv-s 824527 gunnar 0r CHR 1,3 0t0 4 /dev/null freeciv-s 824527 gunnar 1u IPv6 1362042 0t0 TCP [::1]:farenet (LISTEN) freeciv-s 824527 gunnar 2u IPv4 1362043 0t0 TCP 127.0.0.1:farenet (LISTEN) freeciv-s 824527 gunnar 3u IPv6 1341307 0t0 TCP [::1]:farenet->[::1]:54822 (ESTABLISHED) This results in further log messages to be written to the TCP listener file descriptor. -- Ticket information of Freeciv project Freeciv Project is hosted on OSDN Project URL: https://osdn.net/projects/freeciv/ OSDN: https://osdn.net URL for this Ticket: https://osdn.net/projects/freeciv/ticket/42471 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=42471