relay log problem
Alexandre Julliard
julliard at winehq.org
Fri Jan 29 06:18:11 CST 2010
Michael Stefaniuc <mstefani at redhat.com> writes:
> Anyway the usage of write(2) in NTDLL_dbg_vprintf() is *wrong* as it
> doesn't check for short writes nor errors. It is good enough for debug
> output and better than using the FILE * functions but not good enough to
> prevent interleaving. It even introduces an opportunity for parts of a
> line to be overwritten in the case of short writes.
The usage is correct, checking for short writes or errors in debug
output would be much more wrong, and O_APPEND does a fine job at
preventing interleaving. More importantly, there's no other sane way to
do it. And I doubt you'd be able to trigger short writes in practice
when writing to a log file.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list