From 464b7606a86eec9f3413bbd1e0bc1be0966e2360 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Tue, 3 Mar 2009 22:32:18 +0100 Subject: [PATCH] ssld: Do not do redundant rb_setselect(). Apparently solaris devpoll/ports may have a problem with this. from ircd-ratbox (androsyn) --- ssld/ssld.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ssld/ssld.c b/ssld/ssld.c index 526069691..55da1dd47 100644 --- a/ssld/ssld.c +++ b/ssld/ssld.c @@ -1025,8 +1025,9 @@ mod_write_ctl(rb_fde_t *F, void *data) if(retlen == 0 || (retlen < 0 && !rb_ignore_errno(errno))) exit(0); - rb_setselect(ctl->F, RB_SELECT_WRITE, mod_write_ctl, ctl); } + if(rb_dlink_list_length(&ctl->writeq) > 0) + rb_setselect(ctl->F, RB_SELECT_WRITE, mod_write_ctl, ctl); } @@ -1076,6 +1077,7 @@ main(int argc, char **argv) close(x); } x = open("/dev/null", O_RDWR); + if(x >= 0) { if(ctlfd != 0 && pipefd != 0)