M
Mathias Herrmann
Hi.
I have the following problem:
Using popen() to execute a program and read its stdout works usually fine.
Now I try to do this with a program called xsupplicant (maybe one knows),
but I dont get the output of it while it is running.
This is probably a problem of stdout being buffered, because if I use
fflush() after a printf() in the xsupplicant then I can read the output.
My question is now: is it possible to tell stdout not to buffer anything,
but immediately print it out.
I dont want to change the xsupplicant source code.
Hope anyone understood what I am trying to say.
thanks.
I have the following problem:
Using popen() to execute a program and read its stdout works usually fine.
Now I try to do this with a program called xsupplicant (maybe one knows),
but I dont get the output of it while it is running.
This is probably a problem of stdout being buffered, because if I use
fflush() after a printf() in the xsupplicant then I can read the output.
My question is now: is it possible to tell stdout not to buffer anything,
but immediately print it out.
I dont want to change the xsupplicant source code.
Hope anyone understood what I am trying to say.
thanks.