diff options
Diffstat (limited to 'src/port/pipe.c')
-rw-r--r-- | src/port/pipe.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/port/pipe.c b/src/port/pipe.c index fe94c091113..4a707f7335c 100644 --- a/src/port/pipe.c +++ b/src/port/pipe.c @@ -10,7 +10,7 @@ * must be replaced with recv/send. * * IDENTIFICATION - * $PostgreSQL: pgsql/src/port/pipe.c,v 1.1 2004/01/09 04:58:09 momjian Exp $ + * $PostgreSQL: pgsql/src/port/pipe.c,v 1.2 2004/04/19 17:42:59 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -53,3 +53,13 @@ pgpipe(int handles[2]) closesocket(s); return 0; } + + +int piperead(int s, char* buf, int len) +{ + int ret = recv(s,buf,len,0); + if (ret < 0 && WSAGetLastError() == WSAECONNRESET) + /* EOF on the pipe! (win32 socket based implementation) */ + ret = 0; + return ret; +} |