News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

FIx for SIGPIPE crash on other OS than Windows

Started by THLeaderH, April 18, 2020, 09:42:43 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

THLeaderH

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.

makie

Maybe this is my problem too
Quoteprevent meaningless program termination.

Dwachs

Parsley, sage, rosemary, and maggikraut.