From 3a56ef17cf551463cf6a91746a4fe549df7af348 Mon Sep 17 00:00:00 2001 From: Kevin Ryde Date: Sun, 24 Dec 2006 09:43:02 +0000 Subject: [PATCH] (scm_write, scm_display, scm_write_char): Disable port close on EPIPE. This was previously disabled but introduction of HAVE_PIPE check in configure.in unintentionally enabled it. Believe that testing errno after scm_prin1 or scm_putc is bogus, a long ago error can leave errno in that state. popen.test "no duplicates" output test provoked that. --- libguile/print.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libguile/print.c b/libguile/print.c index efd51ce06..8bed72297 100644 --- a/libguile/print.c +++ b/libguile/print.c @@ -926,11 +926,13 @@ scm_write (SCM obj, SCM port) SCM_ASSERT (scm_valid_oport_value_p (port), port, SCM_ARG2, s_write); scm_prin1 (obj, port, 1); +#if 0 #ifdef HAVE_PIPE # ifdef EPIPE if (EPIPE == errno) scm_close_port (port); # endif +#endif #endif return SCM_UNSPECIFIED; } @@ -947,11 +949,13 @@ scm_display (SCM obj, SCM port) SCM_ASSERT (scm_valid_oport_value_p (port), port, SCM_ARG2, s_display); scm_prin1 (obj, port, 0); +#if 0 #ifdef HAVE_PIPE # ifdef EPIPE if (EPIPE == errno) scm_close_port (port); # endif +#endif #endif return SCM_UNSPECIFIED; } @@ -1084,11 +1088,13 @@ SCM_DEFINE (scm_write_char, "write-char", 1, 1, 0, SCM_VALIDATE_OPORT_VALUE (2, port); scm_putc ((int) SCM_CHAR (chr), SCM_COERCE_OUTPORT (port)); +#if 0 #ifdef HAVE_PIPE # ifdef EPIPE if (EPIPE == errno) scm_close_port (port); # endif +#endif #endif return SCM_UNSPECIFIED; }