Project

General

Profile

Actions

Bug #672

closed

rb_io_flush in pipe_open

Added by znz (Kazuhiro NISHIYAMA) over 15 years ago. Updated almost 13 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
Backport:
[ruby-dev:36840]

Description

=begin
直後のrb_forkの中で
#define prefork() (
rb_io_flush(rb_stdout),
rb_io_flush(rb_stderr)
)
prefork();
としているので、pipe_openのrb_io_flushは不要なのではないでしょうか?

Index: io.c

--- io.c (revision 19868)
+++ io.c (working copy)
@@ -4445,8 +4445,6 @@ pipe_open(struct rb_exec_arg eargp, VAL
}
else {
fflush(stdin); /
is it really needed? */

  • rb_io_flush(rb_stdout);
  • rb_io_flush(rb_stderr);
    pid = rb_fork(&status, 0, 0, Qnil);
    if (pid == 0) { /* child */
    popen_redirect(&arg);
    =end
Actions

Also available in: Atom PDF

Like0
Like0