about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--library/std/src/io/stdio.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/library/std/src/io/stdio.rs b/library/std/src/io/stdio.rs
index 05bdbe0f563..b7d3c47e24b 100644
--- a/library/std/src/io/stdio.rs
+++ b/library/std/src/io/stdio.rs
@@ -548,7 +548,9 @@ pub fn stdout() -> Stdout {
                     }
                 }
             });
-            ReentrantMutex::new(RefCell::new(LineWriter::new(stdout_raw())))
+            let r = ReentrantMutex::new(RefCell::new(LineWriter::new(stdout_raw())));
+            r.init();
+            r
         }),
     }
 }