|
16 | 16 | *
|
17 | 17 | * Copyright (c) 2001, PostgreSQL Global Development Group
|
18 | 18 | *
|
19 |
| - * $Header: /cvsroot/pgsql/src/backend/postmaster/pgstat.c,v 1.32 2003/03/20 03:34:56 momjian Exp $ |
| 19 | + * $Header: /cvsroot/pgsql/src/backend/postmaster/pgstat.c,v 1.33 2003/04/25 01:24:00 momjian Exp $ |
20 | 20 | * ----------
|
21 | 21 | */
|
22 | 22 | #include "postgres.h"
|
@@ -235,7 +235,7 @@ pgstat_init(void)
|
235 | 235 |
|
236 | 236 | startup_failed:
|
237 | 237 | if (pgStatSock >= 0)
|
238 |
| - close(pgStatSock); |
| 238 | + closesocket(pgStatSock); |
239 | 239 | pgStatSock = -1;
|
240 | 240 |
|
241 | 241 | /* Adjust GUC variables to suppress useless activity */
|
@@ -359,10 +359,10 @@ void
|
359 | 359 | pgstat_close_sockets(void)
|
360 | 360 | {
|
361 | 361 | if (pgStatPmPipe[0] >= 0)
|
362 |
| - close(pgStatPmPipe[0]); |
| 362 | + closesocket(pgStatPmPipe[0]); |
363 | 363 | pgStatPmPipe[0] = -1;
|
364 | 364 | if (pgStatPmPipe[1] >= 0)
|
365 |
| - close(pgStatPmPipe[1]); |
| 365 | + closesocket(pgStatPmPipe[1]); |
366 | 366 | pgStatPmPipe[1] = -1;
|
367 | 367 | }
|
368 | 368 |
|
@@ -1120,7 +1120,7 @@ pgstat_main(void)
|
1120 | 1120 | * Close the writing end of the postmaster pipe, so we'll see it
|
1121 | 1121 | * closing when the postmaster terminates and can terminate as well.
|
1122 | 1122 | */
|
1123 |
| - close(pgStatPmPipe[1]); |
| 1123 | + closesocket(pgStatPmPipe[1]); |
1124 | 1124 | pgStatPmPipe[1] = -1;
|
1125 | 1125 |
|
1126 | 1126 | /*
|
@@ -1167,13 +1167,13 @@ pgstat_main(void)
|
1167 | 1167 |
|
1168 | 1168 | case 0:
|
1169 | 1169 | /* child becomes collector process */
|
1170 |
| - close(pgStatPipe[1]); |
1171 |
| - close(pgStatSock); |
| 1170 | + closesocket(pgStatPipe[1]); |
| 1171 | + closesocket(pgStatSock); |
1172 | 1172 | break;
|
1173 | 1173 |
|
1174 | 1174 | default:
|
1175 | 1175 | /* parent becomes buffer process */
|
1176 |
| - close(pgStatPipe[0]); |
| 1176 | + closesocket(pgStatPipe[0]); |
1177 | 1177 | pgstat_recvbuffer();
|
1178 | 1178 | exit(0);
|
1179 | 1179 | }
|
|
0 commit comments