Messages in this thread | | | Date | Fri, 18 Jan 2013 10:30:30 -0800 | From | Andi Kleen <> | Subject | Re: [PATCH v3 2/2] perf stat: add interval printing |
| |
> if (forks) { > close(go_pipe[1]); > + if (interval) { > + while (!waitpid(child_pid, &status, WNOHANG)) { > + ret = nanosleep(&ts, NULL); > + if (ret == 0 && interval) > + print_interval();
It would be good to make sure that if someone Ctrl-Cs you still print the latest interval(even if shorter)
The rest looks good to me.
-Andi
| |