Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
bda6e04b
Commit
bda6e04b
authored
Mar 15, 2004
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check for EOF on pipe differs under win32, as it is based on a socket
implementation. Claudio Natoli
parent
f744c0f7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
src/backend/postmaster/pgstat.c
src/backend/postmaster/pgstat.c
+14
-3
No files found.
src/backend/postmaster/pgstat.c
View file @
bda6e04b
...
...
@@ -13,7 +13,7 @@
*
* Copyright (c) 2001-2003, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.6
0 2004/03/10 21:12:46
momjian Exp $
* $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.6
1 2004/03/15 16:21:37
momjian Exp $
* ----------
*/
#include "postgres.h"
...
...
@@ -1642,6 +1642,7 @@ pgstat_mainChild(PGSTAT_FORK_ARGS)
*/
int
nread
=
0
;
int
targetlen
=
sizeof
(
PgStat_MsgHdr
);
/* initial */
bool
pipeEOF
=
false
;
while
(
nread
<
targetlen
)
{
...
...
@@ -1652,13 +1653,23 @@ pgstat_mainChild(PGSTAT_FORK_ARGS)
{
if
(
errno
==
EINTR
)
continue
;
#ifdef WIN32
if
(
WSAGetLastError
()
==
WSAECONNRESET
)
/* EOF on the pipe! (win32 socket based implementation) */
{
pipeEOF
=
true
;
break
;
}
#endif
ereport
(
LOG
,
(
errcode_for_socket_access
(),
errmsg
(
"could not read from statistics collector pipe: %m"
)));
exit
(
1
);
}
if
(
len
==
0
)
/* EOF on the pipe! */
{
pipeEOF
=
true
;
break
;
}
nread
+=
len
;
if
(
nread
==
sizeof
(
PgStat_MsgHdr
))
{
...
...
@@ -1683,7 +1694,7 @@ pgstat_mainChild(PGSTAT_FORK_ARGS)
* EOF on the pipe implies that the buffer process exited.
* Fall out of outer loop.
*/
if
(
len
==
0
)
if
(
pipeEOF
)
break
;
/*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment