|
13 | 13 | * |
14 | 14 | *Copyright (c) 2001-2005, PostgreSQL Global Development Group |
15 | 15 | * |
16 | | - *$PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.117 2006/01/0316:42:17 momjian Exp $ |
| 16 | + *$PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.118 2006/01/0319:54:08 momjian Exp $ |
17 | 17 | * ---------- |
18 | 18 | */ |
19 | 19 | #include"postgres.h" |
@@ -1870,14 +1870,6 @@ pgstat_recvbuffer(void) |
1870 | 1870 | */ |
1871 | 1871 | msgbuffer= (char*)palloc(PGSTAT_RECVBUFFERSZ); |
1872 | 1872 |
|
1873 | | -/* |
1874 | | - * Wait for some work to do; but not for more than 10 seconds. (This |
1875 | | - * determines how quickly we will shut down after an ungraceful |
1876 | | - * postmaster termination; so it needn't be very fast.) |
1877 | | - */ |
1878 | | -timeout.tv_sec=10; |
1879 | | -timeout.tv_usec=0; |
1880 | | - |
1881 | 1873 | /* |
1882 | 1874 | * Loop forever |
1883 | 1875 | */ |
@@ -1918,6 +1910,15 @@ pgstat_recvbuffer(void) |
1918 | 1910 | maxfd=writePipe; |
1919 | 1911 | } |
1920 | 1912 |
|
| 1913 | +/* |
| 1914 | + * Wait for some work to do; but not for more than 10 seconds. (This |
| 1915 | + * determines how quickly we will shut down after an ungraceful |
| 1916 | + * postmaster termination; so it needn't be very fast.) struct timeout |
| 1917 | + * is modified by some operating systems. |
| 1918 | + */ |
| 1919 | +timeout.tv_sec=10; |
| 1920 | +timeout.tv_usec=0; |
| 1921 | + |
1921 | 1922 | if (select(maxfd+1,&rfds,&wfds,NULL,&timeout)<0) |
1922 | 1923 | { |
1923 | 1924 | if (errno==EINTR) |
|