Deleted Added
full compact
42c42
< "$FreeBSD: head/lib/libc/stdio/refill.c 71579 2001-01-24 13:01:12Z deischen $";
---
> "$FreeBSD: head/lib/libc/stdio/refill.c 72373 2001-02-11 22:06:43Z deischen $";
44a45
> #include "namespace.h"
47a49
> #include "un-namespace.h"
48a51
> #include "libc_private.h"
54,55c57
< lflush(fp)
< FILE *fp;
---
> lflush(FILE *fp)
56a59
> int ret = 0;
58,60c61,66
< if ((fp->_flags & (__SLBF|__SWR)) == (__SLBF|__SWR))
< return (__sflush(fp));
< return (0);
---
> if ((fp->_flags & (__SLBF|__SWR)) == (__SLBF|__SWR)) {
> FLOCKFILE(fp);
> ret = __sflush(fp);
> FUNLOCKFILE(fp);
> }
> return (ret);
68,69c74
< __srefill(fp)
< register FILE *fp;
---
> __srefill(FILE *fp)
71d75
<
122c126,128
< if (fp->_flags & (__SLBF|__SNBF))
---
> if (fp->_flags & (__SLBF|__SNBF)) {
> /* Ignore this file in _fwalk to avoid potential deadlock. */
> fp->_flags |= __SIGN;
123a130,135
> fp->_flags &= ~__SIGN;
>
> /* Now flush this file without locking it. */
> if ((fp->_flags & (__SLBF|__SWR)) == (__SLBF|__SWR))
> __sflush(fp);
> }