diff options
Diffstat (limited to 'libguile/ioext.c')
-rw-r--r-- | libguile/ioext.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libguile/ioext.c b/libguile/ioext.c index 3f0a53f5d..f39771eec 100644 --- a/libguile/ioext.c +++ b/libguile/ioext.c @@ -89,14 +89,14 @@ SCM_DEFINE (scm_redirect_port, "redirect-port", 2, 0, 0, /* Ensure there is nothing in either port's input or output buffers. */ if (SCM_OUTPUT_PORT_P (old)) - scm_flush_unlocked (old); - if (SCM_INPUT_PORT_P (old)) - scm_end_input_unlocked (old); + scm_flush (old); + if (SCM_INPUT_PORT_P (old) && SCM_PTAB_ENTRY (old)->rw_random) + scm_end_input (old); if (SCM_OUTPUT_PORT_P (new)) - scm_flush_unlocked (new); - if (SCM_INPUT_PORT_P (new)) - scm_end_input_unlocked (new); + scm_flush (new); + if (SCM_INPUT_PORT_P (new) && SCM_PTAB_ENTRY (new)->rw_random) + scm_end_input (new); ans = dup2 (oldfd, newfd); if (ans == -1) |