I am running an external process with system(). I don’t need any output. It looks like this:
printf("Running... ") system("process_that_takes_long > /dev/null"); puts("done.);
The problem is that “Running…” doesn’t get displayed until AFTER the completion of process_that_takes_long… I don;t have the issue if I don’t redirect the output of the process to /dev/null (but then I have garbage on display).
Is there a way to flush a message to stdout? I would use ‘fflush’ in C.
Thanks a lot,