The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: THLeaderH on April 18, 2020, 09:42:43 AM

Title: FIx for SIGPIPE crash on other OS than Windows
Post by: THLeaderH on April 18, 2020, 09:42:43 AM
The UNIX system call "send()" sends SIGPIPE signal when the socket breaks while sending data. The default handling of SIGPIPE is terminating the program on the most platforms, and we have to handle this signal.

The sending error itself is handled in the program so we can just ignore SIGPIPE signal. The attached patch makes system ignore SIGPIPE signal to prevent meaningless program termination.

Please note that Windows does not have SIGPIPE and I excluded the code using macros.
Title: Re: FIx for SIGPIPE crash on other OS than Windows
Post by: makie on April 18, 2020, 12:39:54 PM
Maybe this is my problem too
Quote
prevent meaningless program termination.
Title: Re: FIx for SIGPIPE crash on other OS than Windows
Post by: Dwachs on April 18, 2020, 06:14:10 PM
Thanks, in r9029.