aboutsummaryrefslogtreecommitdiff
path: root/src/port/pipe.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/port/pipe.c')
-rw-r--r--src/port/pipe.c43
1 files changed, 1 insertions, 42 deletions
diff --git a/src/port/pipe.c b/src/port/pipe.c
index 9fdab8ca738..9bbef1164e7 100644
--- a/src/port/pipe.c
+++ b/src/port/pipe.c
@@ -10,17 +10,13 @@
* must be replaced with recv/send.
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/port/pipe.c,v 1.3 2004/05/11 21:57:15 momjian Exp $
+ * $PostgreSQL: pgsql/src/port/pipe.c,v 1.4 2004/05/18 20:18:59 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
-#include <sys/wait.h>
-
-#define _(x) gettext((x))
-
#ifdef WIN32
int
pgpipe(int handles[2])
@@ -70,40 +66,3 @@ int piperead(int s, char* buf, int len)
}
#endif
-/*
- * pclose() plus useful error reporting
- * Is this necessary? bjm 2004-05-11
- */
-int
-pclose_check(FILE *stream)
-{
- int exitstatus;
-
- exitstatus = pclose(stream);
-
- if (exitstatus == 0)
- return 0; /* all is well */
-
- if (exitstatus == -1)
- {
- /* pclose() itself failed, and hopefully set errno */
- perror("pclose failed");
- }
- else if (WIFEXITED(exitstatus))
- {
- fprintf(stderr, _("child process exited with exit code %d\n"),
- WEXITSTATUS(exitstatus));
- }
- else if (WIFSIGNALED(exitstatus))
- {
- fprintf(stderr, _("child process was terminated by signal %d\n"),
- WTERMSIG(exitstatus));
- }
- else
- {
- fprintf(stderr, _("child process exited with unrecognized status %d\n"),
- exitstatus);
- }
-
- return -1;
-}