Bug #672: rb_io_flush in pipe_open
http://redmine.ruby-lang.org/issues/show/672
e$B5/I<<Te(B: Kazuhiro NISHIYAMA
e$B%9%F!<%?%9e(B: Open, e$BM%@hEYe(B: Normal
e$B%+%F%4%je(B: core
e$BD>8e$Ne(Brb_forke$B$NCf$Ge(B
#define prefork() (
rb_io_flush(rb_stdout),
rb_io_flush(rb_stderr)
)
prefork();
e$B$H$7$F$$$k$N$G!"e(Bpipe_opene$B$Ne(Brb_io_flushe$B$OITMW$J$N$G$O$J$$$G$7$g$&$+e(B?
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);