flushing output in lshal --monitor
Maciej Grela
maciej.grela at gmail.com
Fri Feb 13 04:25:47 PST 2009
2009/2/5 xworq <xworq at gmx.net>:
> hi everyone,
>
> i wrote a java program that launches lshal --monitor through a process
> to receive hal events. in my program, i simply read the outputstream
> from the process then.
>
> the problem is i don't get any output because lshal does not flush the
> stdout stream after a printf.
>
> i added fflush(stdout) after every printf, compiled it and now i have
> the behavior i want.
>
> it would be great if new releases of hal could do this.
> or are there better ways to receive hal events in java anyway?
>
Have you tried using dbus-java bindings ? They can be found here:
http://dbus.freedesktop.org/doc/dbus-java/
Best regards,
Maciej Grela
More information about the hal
mailing list