From 93c7dcffa2e0ec304bf968c9977670d81ea58bd3 Mon Sep 17 00:00:00 2001 From: "Marc G. Fournier" Date: Fri, 4 Oct 1996 20:33:18 +0000 Subject: [PATCH] Here the fix for the first assertion failure I had which killed my postmaster 1.07. It's really simple, the loop dealing with all sockets can't handle more than one ready socket :-) A simple logic error dealing with lists. OR IS THERE ANY REASON FOR SETTING curr TO 0? Submitted by: Carsten Heyl --- src/backend/postmaster/postmaster.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index 215eadaee5..e4beb41ab4 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.3.2.2 1996/10/02 21:36:32 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.3.2.3 1996/10/04 20:33:18 scrappy Exp $ * * NOTES * @@ -403,7 +403,7 @@ ServerLoop() int serverFd = ServerSock; fd_set rmask, basemask; int nSockets, nSelected, status, newFd; - Dlelem *prev, *curr; + Dlelem *next, *curr; /* int orgsigmask = sigblock(0); */ sigset_t oldsigmask, newsigmask; @@ -541,10 +541,11 @@ ServerLoop() } FD_CLR(port->sock, &basemask); StreamClose(port->sock); - prev = DLGetPred(curr); + next = DLGetPred(curr); DLRemove(curr); DLFreeElem(curr); - curr = 0; + curr = next; + continue; } curr = DLGetSucc(curr); } -- 2.50.1