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: contributor

    <!--5d09a71f8925f3f132321140b44b946d-->The last travis run for this pull request was 80 days ago and is thus outdated. To trigger a fresh travis build, this pull request should be closed and re-opened.

  10. DrahtBot closed this on Jul 22, 2018

  11. DrahtBot reopened this on Jul 22, 2018

  12. DrahtBot cross-referenced this on Jul 26, 2018 from issue [bugfix] Fix encoding issue for Windows by ken2812221
  13. DrahtBot cross-referenced this on Jul 28, 2018 from issue Test for Windows encoding issue by ken2812221
  14. DrahtBot cross-referenced this on Aug 3, 2018 from issue utils: drop boost::interprocess::file_lock by ken2812221
  15. DrahtBot cross-referenced this on Aug 3, 2018 from issue utils: Use _wfopen and _wfreopen on Windows by ken2812221
  16. DrahtBot cross-referenced this on Aug 4, 2018 from issue utils: Add fstream wrapper to allow to pass unicode filename on Windows by ken2812221
  17. ajtowns commented at 7:32 AM on August 7, 2018: contributor

    Tested ACK 37efe5b7ea059e56d8f5170c91e3160db286cad4

    To test:

    $ bitcoind -regtest -daemon
    $ cd ~/.bitcoin/regtest
    $ mv debug.log{,.old}
    $ touch debug.log; chmod 400 debug.log
    $ killall -HUP bitcoind
    $ 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.

  18. ajtowns cross-referenced this on Aug 7, 2018 from issue Log early messages with -printtoconsole by ajtowns
  19. MarcoFalke commented at 6:59 PM on August 20, 2018: member

    utACK 37efe5b7ea059e56d8f5170c91e3160db286cad4

  20. DrahtBot added the label Needs rebase on Aug 29, 2018
  21. Don't close old debug log file handle prematurely when trying to re-open (on SIGHUP) cceedbc4bf
  22. Remove unused fsbridge::freopen 75ea00f391
  23. practicalswift force-pushed on Aug 29, 2018
  24. practicalswift commented at 2:06 PM on August 29, 2018: contributor

    Rebased! @luke-jr @ajtowns @MarcoFalke Please re-review :-)

  25. DrahtBot removed the label Needs rebase on Aug 29, 2018
  26. MarcoFalke commented at 7:12 PM on August 29, 2018: member

    re-utACK 75ea00f391b742e435c650aae3e827aad913d552

  27. ajtowns commented at 9:07 AM on August 30, 2018: contributor

    re-ACK 75ea00f391b742e435c650aae3e827aad913d552

  28. laanwj commented at 11:19 AM on August 31, 2018: member

    utACK 75ea00f391b742e435c650aae3e827aad913d552, good to get rid of the need of freopen I suppose

  29. laanwj merged this on Aug 31, 2018
  30. laanwj closed this on Aug 31, 2018

  31. laanwj referenced this in commit bb0277819a on Aug 31, 2018
  32. Bushstar cross-referenced this on Sep 4, 2018 from issue commits from bitcoin/master by Bushstar
  33. jasonbcox referenced this in commit 3bdbe48216 on Sep 13, 2019
  34. jonspock referenced this in commit 130286a16d on Dec 22, 2019
  35. proteanx referenced this in commit 910826634c on Dec 23, 2019
  36. random-zebra cross-referenced this on Feb 5, 2021 from issue [Bug][Refactoring] Miscellaneous fixes by random-zebra
  37. Fuzzbawls referenced this in commit 71ed429370 on Feb 14, 2021
  38. practicalswift deleted the branch on Apr 10, 2021
  39. Munkybooty referenced this in commit a58bf3ca3f on Jun 30, 2021
  40. Munkybooty referenced this in commit 561093f425 on Jul 2, 2021
  41. Munkybooty referenced this in commit 2be36d4db5 on Jul 2, 2021
  42. str4d cross-referenced this on Dec 6, 2021 from issue Backport changes to `src/fs.{cpp,h}` by str4d
  43. bitcoin 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: 2026-05-20 06:55 UTC