-
Notifications
You must be signed in to change notification settings - Fork 102
IRCd listening sockets are erroneously inherited by libratbox helper processes (e.g. bandb) on illumos (SunOS 5.11) #291
Comments
Reproduced on 3.5.7.
lsof for the ports ircd opens:
|
I'd hazard a guess that |
shall i throw you a shell account on my illumos box? |
and yes, I just find|xargs grep'd through the source code of my fork, and O_CLOEXEC is not being set anywhere. |
would it be idiomatic ratbox coding to dig into an rb_fde_t, or are those values to be treated as black boxes? pre-publish edit: it appears to be int rb_get_fd() to get the fd out of an F. good-o. I'm considering adding a hack to my 3.5.7 fork (and possibly pull-req'ing it back to mainline 3.5.7 if it's idiomatic) that will fcntl F_SETFD FD_CLOEXEC listeners and the sockets created off of accept()ing them. |
By the way, a lowercase i in illumos is correct title case, because the brand is in lowercase. |
By the way, @aaronmdjones, incorporating the fix you suggest seems to work on my illumos system.
I can even still reconnect. Adding this line seems to be what fixed it:
|
…d by amdj on charybdis-ircd/charybdis#291 for what I am calling the 'bandb bug'. per @aaronmdjones, "I'd hazard a guess that O_CLOEXEC isn't being set somewhere (or isn't being respected, if it is). I'll have a look into this, but without a system to test and reproduce on, I can't promise anything."
…s suggested by @aaronmdjones (unsure if the bug manifests on master because I wasn't able to compile the ircd)
Curious. The same line doesn't seem to fix it in chary 4. In addition, if I kill the ircd process (or shut it down gracefully, even), neither bandb nor ssld close down correctly. |
So far, this has only been reproduced on a fork of 3.5.7. It will be tested on a clean 3.5.7 work tree, and this bug is not to be considered valid until such time as it has been reproduced on clean 3.5.7.
The text was updated successfully, but these errors were encountered: