From d2bd05420a1f88b2d678e3b5dda3faf125a0e37d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 9 Feb 2004 20:08:44 +0000 Subject: [PATCH] glibc: (_IO_cleanup): Do not use locking when flushing ... the buffers. Some thread might be using a stream. --- src/system/libroot/posix/glibc/libio/genops.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/system/libroot/posix/glibc/libio/genops.c b/src/system/libroot/posix/glibc/libio/genops.c index b5b4936f19..7fa0a224c4 100644 --- a/src/system/libroot/posix/glibc/libio/genops.c +++ b/src/system/libroot/posix/glibc/libio/genops.c @@ -941,7 +941,9 @@ _IO_unbuffer_write () int _IO_cleanup () { - int result = INTUSE(_IO_flush_all) (); + /* We do *not* want locking. Some threads might use streams but + that is there problem, we flush them underneath them. */ + int result = _IO_flush_all_lockp (0); /* We currently don't have a reliable mechanism for making sure that C++ static destructors are executed in the correct order.