[PATCH] suggestion : flush outputs in wpa_printf

Jouni Malinen j
Wed Feb 4 12:11:29 PST 2009

On Tue, Feb 03, 2009 at 05:23:48PM +0100, Annie Rota wrote:

> In order to improve interprocess readability between wpa_supplicant and
> clients of the control interface,
> I propose to fflush the outputs of wpa_printf more often (especially
> stdout).

This is likely to increase latency and make debug mode differ more from
non-debug as far as timing is concerned which could, at least in theory,
make it more difficult to reproduce some timing issues. Could you please
describe the use case where there are multiple sources producing output
to stdout? Is it clear that the other sources are flushing output as
well? What about the debug-to-a-file option? If it is really going into
a file writing into the same file from another process at the same time
may not be that good of an idea..

If a better ordering of events is desired, it could be done more
reliable by using timestamps on the event messages from all sources and
then merging the separately generated outputs together and sorting the
result based on the timestamps.

Jouni Malinen                                            PGP id EFC895FA

More information about the Hostap mailing list