diff options
author | Bruce Momjian <bruce@momjian.us> | 2003-04-25 01:24:00 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2003-04-25 01:24:00 +0000 |
commit | db7e46a76dc5ea8f15ed0ca67cc232b5ea38938d (patch) | |
tree | e5267da20e29b26b95ba0dcf04ce1b5809d394d1 /src/backend/postmaster/pgstat.c | |
parent | 5f677af2da8ca15516758a5b6c3af8565785977d (diff) | |
download | postgresql-db7e46a76dc5ea8f15ed0ca67cc232b5ea38938d.tar.gz postgresql-db7e46a76dc5ea8f15ed0ca67cc232b5ea38938d.zip |
Use closesocket() for all socket/pipe closing, because Win32 requires
it, and map that to close() on Unix.
Diffstat (limited to 'src/backend/postmaster/pgstat.c')
-rw-r--r-- | src/backend/postmaster/pgstat.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/backend/postmaster/pgstat.c b/src/backend/postmaster/pgstat.c index 86d47db9efd..c5835226e64 100644 --- a/src/backend/postmaster/pgstat.c +++ b/src/backend/postmaster/pgstat.c @@ -16,7 +16,7 @@ * * Copyright (c) 2001, PostgreSQL Global Development Group * - * $Header: /cvsroot/pgsql/src/backend/postmaster/pgstat.c,v 1.32 2003/03/20 03:34:56 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/postmaster/pgstat.c,v 1.33 2003/04/25 01:24:00 momjian Exp $ * ---------- */ #include "postgres.h" @@ -235,7 +235,7 @@ pgstat_init(void) startup_failed: if (pgStatSock >= 0) - close(pgStatSock); + closesocket(pgStatSock); pgStatSock = -1; /* Adjust GUC variables to suppress useless activity */ @@ -359,10 +359,10 @@ void pgstat_close_sockets(void) { if (pgStatPmPipe[0] >= 0) - close(pgStatPmPipe[0]); + closesocket(pgStatPmPipe[0]); pgStatPmPipe[0] = -1; if (pgStatPmPipe[1] >= 0) - close(pgStatPmPipe[1]); + closesocket(pgStatPmPipe[1]); pgStatPmPipe[1] = -1; } @@ -1120,7 +1120,7 @@ pgstat_main(void) * Close the writing end of the postmaster pipe, so we'll see it * closing when the postmaster terminates and can terminate as well. */ - close(pgStatPmPipe[1]); + closesocket(pgStatPmPipe[1]); pgStatPmPipe[1] = -1; /* @@ -1167,13 +1167,13 @@ pgstat_main(void) case 0: /* child becomes collector process */ - close(pgStatPipe[1]); - close(pgStatSock); + closesocket(pgStatPipe[1]); + closesocket(pgStatSock); break; default: /* parent becomes buffer process */ - close(pgStatPipe[0]); + closesocket(pgStatPipe[0]); pgstat_recvbuffer(); exit(0); } |