Comment by ๐Ÿš€ ingrix

Re: "Fornax and SIGPIPE"

In: s/Fornax

@stack so Fornax does seem to be very resistant to catching a SIGPIPE, but I have in the last couple of minutes since posting my question managed to trigger one. I'm not sure exactly how, I haven't been able to reproduce it yet. I guess it seems your particular flow of interactions between epoll() and OpenSSL works particularly well or something. If I can figure out how I did it I'll let you know.

๐Ÿš€ ingrix [OP]

2025-09-19 ยท 8 months ago

3 Later Comments โ†“

๐Ÿš€ stack [mod] ยท 2025-09-19 at 18:26:

@ingrix, I've been looking at SIGPIPE, and decided to just SIG_IGN it. I tried to be very careful checking for socket errors, and I haven't experienced SIGPIPE issues yet. We'll see what happens.

๐Ÿš€ ingrix [OP] ยท 2025-09-19 at 18:55:

@stack that's certainly the safest bet, and the way that most server's I have seen handle it. I have still not reproduced the SIGPIPE so whatever magic you are conjuring is pretty good, but no sense risking a fatal signal. (Edit: typo)

๐Ÿš€ stack [mod] ยท 2025-09-19 at 19:01:

@ingrix -- Be aware that I just pushed a lot of changes to the repo... There are two test servers running on ports 10965 and 10966, with the newest code.

Original Post

๐ŸŒ’ s/Fornax

๐Ÿš€ ingrix:

Fornax and SIGPIPE โ€” How does Fornax handle SIGPIPE? One of the reasons I've got relatively complicated netcode in libpxd is for managing SIGPIPE without globally ignoring it or masking it before SSL calls - and I have gotten them before in strange situations, particularly from SSL_shutdown. Fornax doesn't seem to handle SIGPIPE in any way, but it also doesn't do anything special with the SSL objects like I do in libpxd, so I'm curious where the magic is.

๐Ÿ’ฌ 5 comments ยท 2025-09-19 ยท 8 months ago