mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-21 12:10:26 +02:00
(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.
This commit is contained in:
parent
fd841cacc3
commit
3a56ef17cf
1 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue