Index: src/backend/postmaster/pgstat.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/postmaster/pgstat.c,v retrieving revision 1.117 diff -c -c -r1.117 pgstat.c *** src/backend/postmaster/pgstat.c 3 Jan 2006 16:42:17 -0000 1.117 --- src/backend/postmaster/pgstat.c 3 Jan 2006 19:52:14 -0000 *************** *** 1871,1884 **** msgbuffer = (char *) palloc(PGSTAT_RECVBUFFERSZ); /* - * Wait for some work to do; but not for more than 10 seconds. (This - * determines how quickly we will shut down after an ungraceful - * postmaster termination; so it needn't be very fast.) - */ - timeout.tv_sec = 10; - timeout.tv_usec = 0; - - /* * Loop forever */ for (;;) --- 1871,1876 ---- *************** *** 1918,1923 **** --- 1910,1924 ---- maxfd = writePipe; } + /* + * Wait for some work to do; but not for more than 10 seconds. (This + * determines how quickly we will shut down after an ungraceful + * postmaster termination; so it needn't be very fast.) struct timeout + * is modified by some operating systems. + */ + timeout.tv_sec = 10; + timeout.tv_usec = 0; + if (select(maxfd + 1, &rfds, &wfds, NULL, &timeout) < 0) { if (errno == EINTR)