could not redirect output of idevicesyslog well
-
viewrain
I took a look at the source code. I found it was the problem of the buffering of stdout.
In tools/idevicesyslog.c, I add one line "setvbuf(stdout, NULL, _IONBF, 0);" at the beginning of the main function to disable the buffering of stdout.
Then the new binary could redirect the output normally when I run "idevicesyslog > /tmp/log".Would you please modify the code or is there a better solution?
Thanks a lot~
-
Nikias Bassen
- State changed from new to resolved
- Tag set to idevicesyslog
I committed a fix using fflush to write out the buffer immediately after the fwrite call. This should fix the issue.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.