Closed MattSANU closed 10 years ago
Hi Matt, thanks for the patches! Will review in the next few days.
Regarding freopen() issue you mention, is it some theorical issue or are you hitting that?
The freopen issue is real, and causes the collector to fail totally; no stats are dumped. So it's not only real, it's a show-stopper. Please cherry-pick it.
Heya Riccardo, I noticed the freopen fix isn't in your tree yet. It is a real bugfix for a real issue - could you please cherry-pick it? Apart from that, I think everything important has been merged. I agree with you, I don't think all of the perror/log additions are necessary. I think once the freopen fix is in, we can close this pull request. What do you think?
Pull request still open, don't worry :)
Pushed the freopen fix, sorry for taking so long. Closing as agreed. Thanks again!
Hi, I've added quite a lot of additional error checking and diagnostics, and various other cleanups. Would you like to pull these, or perhaps cherry-pick them?
Also, there is one real bugfix here, unfortunately a bit buried on other changes:
freopen("/proc/kmsg", "a", stderr) => EBADF ...but... freopen("/proc/kmsg", "w", stderr) => a valid FILE *
I'm guessing that this fails in the append case because the underlying lseek call fails because /proc/kmsg is of length zero, or otherwise because it is not an on-disk file.
Best wishes, Matt