Don’t close old debug log file handle prematurely when trying to re-open (on SIGHUP) #13159

pull practicalswift wants to merge 2 commits into bitcoin:master from practicalswift:handle-reopen-failed changing 3 files +5 −11
  1. practicalswift commented at 4:09 pm on May 3, 2018: contributor

    Don’t close old debug log file handle prematurely when trying to re-open (on SIGHUP).

    Context: #13148 (comment)

    Thanks @ajtowns!

  2. fanquake added the label Utils/log/libs on May 3, 2018
  3. practicalswift renamed this:
    Don't close old debug log file handler prematurely when trying to re-open (on SIGHUP)
    Don't close old debug log file handle prematurely when trying to re-open (on SIGHUP)
    on May 3, 2018
  4. practicalswift force-pushed on May 3, 2018
  5. practicalswift force-pushed on May 3, 2018
  6. luke-jr approved
  7. luke-jr commented at 4:10 am on June 16, 2018: member
    utACK
  8. luke-jr referenced this in commit 51d2202952 on Jul 7, 2018
  9. DrahtBot commented at 11:49 pm on July 22, 2018: member
  10. DrahtBot closed this on Jul 22, 2018

  11. DrahtBot reopened this on Jul 22, 2018

  12. ajtowns commented at 7:32 am on August 7, 2018: member

    Tested ACK 37efe5b7ea059e56d8f5170c91e3160db286cad4

    To test:

    0$ bitcoind -regtest -daemon
    1$ cd ~/.bitcoin/regtest
    2$ mv debug.log{,.old}
    3$ touch debug.log; chmod 400 debug.log
    4$ killall -HUP bitcoind
    5$ bitcoin-cli -regtest savemempool
    

    Current behaviour of master is that the “Dumped mempool” message (along with any other subsequent log messages) aren’t logged to a file, and further that fixing permissions on debug.log and HUP’ing the process isn’t sufficient to re-enable logging to file.

    With the patch, logging continues in debug.log.old, and after fixing the permissions HUP’ing the process causes logging to move to the new file.

  13. MarcoFalke commented at 6:59 pm on August 20, 2018: member
    utACK 37efe5b7ea059e56d8f5170c91e3160db286cad4
  14. DrahtBot added the label Needs rebase on Aug 29, 2018
  15. Don't close old debug log file handle prematurely when trying to re-open (on SIGHUP) cceedbc4bf
  16. Remove unused fsbridge::freopen 75ea00f391
  17. practicalswift force-pushed on Aug 29, 2018
  18. practicalswift commented at 2:06 pm on August 29, 2018: contributor
    Rebased! @luke-jr @ajtowns @MarcoFalke Please re-review :-)
  19. DrahtBot removed the label Needs rebase on Aug 29, 2018
  20. MarcoFalke commented at 7:12 pm on August 29, 2018: member
    re-utACK 75ea00f391b742e435c650aae3e827aad913d552
  21. ajtowns commented at 9:07 am on August 30, 2018: member
    re-ACK 75ea00f391b742e435c650aae3e827aad913d552
  22. laanwj commented at 11:19 am on August 31, 2018: member
    utACK 75ea00f391b742e435c650aae3e827aad913d552, good to get rid of the need of freopen I suppose
  23. laanwj merged this on Aug 31, 2018
  24. laanwj closed this on Aug 31, 2018

  25. laanwj referenced this in commit bb0277819a on Aug 31, 2018
  26. jasonbcox referenced this in commit 3bdbe48216 on Sep 13, 2019
  27. jonspock referenced this in commit 130286a16d on Dec 22, 2019
  28. proteanx referenced this in commit 910826634c on Dec 23, 2019
  29. Fuzzbawls referenced this in commit 71ed429370 on Feb 14, 2021
  30. practicalswift deleted the branch on Apr 10, 2021
  31. Munkybooty referenced this in commit a58bf3ca3f on Jun 30, 2021
  32. Munkybooty referenced this in commit 561093f425 on Jul 2, 2021
  33. Munkybooty referenced this in commit 2be36d4db5 on Jul 2, 2021
  34. DrahtBot locked this on Aug 18, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-07-06 01:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me