Use fflush_unlocked as stdio's fflush_indirect.
exit(3) already locks the file before calling fflush_indirect.
This commit is contained in:
parent
bb73362d23
commit
56085108b6
|
@ -46,6 +46,6 @@ extern "C" int setvbuf_unlocked(FILE* fp, char* buf, int mode, size_t size)
|
||||||
mode = _IONBF;
|
mode = _IONBF;
|
||||||
fp->buffer_mode = mode;
|
fp->buffer_mode = mode;
|
||||||
fp->flags |= _FILE_BUFFER_MODE_SET;
|
fp->flags |= _FILE_BUFFER_MODE_SET;
|
||||||
fp->fflush_indirect = fflush;
|
fp->fflush_indirect = fflush_unlocked;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue