diff --git a/ChangeLog b/ChangeLog index 03bba82de7..c2d99a027b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2014-12-10 Andreas Schwab + + [BZ #12847] + * sysdeps/nptl/fork.c (fresetlockfiles): Skip files with + user-controlled locks. + 2014-12-10 Richard Earnshaw * sysdeps/aarch64/strchrnul.S (vrepmask): Use a call-clobbered diff --git a/sysdeps/nptl/fork.c b/sysdeps/nptl/fork.c index a7dafa82ab..7ef693d529 100644 --- a/sysdeps/nptl/fork.c +++ b/sysdeps/nptl/fork.c @@ -46,7 +46,8 @@ fresetlockfiles (void) _IO_ITER i; for (i = _IO_iter_begin(); i != _IO_iter_end(); i = _IO_iter_next(i)) - _IO_lock_init (*((_IO_lock_t *) _IO_iter_file(i)->_lock)); + if ((_IO_iter_file (i)->_flags & _IO_USER_LOCK) == 0) + _IO_lock_init (*((_IO_lock_t *) _IO_iter_file(i)->_lock)); }