Page MenuHomePhabricator

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

Authored by nakihito on Aug 30 2019, 20:53.

Details

Summary

75ea00f391b742e435c650aae3e827aad913d552 Remove unused fsbridge::freopen (practicalswift)
cceedbc4bf1056db17e0adf76d0db45b94777671 Don't close old debug log file handle prematurely when trying to re-open (on SIGHUP) (practicalswift)

Pull request description:

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

Context: https://github.com/bitcoin/bitcoin/pull/13148#issuecomment-386288606

Thanks @ajtowns!

Tree-SHA512: c436b4286f00fc428b60269b6d6321f435c72c7ccec3c15b2194aac71196529b30f32c2384b418ffe3ed67ba7ee8ec51f4c9c5748e65945697c0437eafcdacd1

Backport of Core PR13159
https://github.com/bitcoin/bitcoin/pull/13159/

Depends on D3976

Test Plan
make check
./bitcoind -regtest -daemon
cd <path>/.bitcoin/regtest
mv debug.log{,.old}
touch debug.log; chmod 400 debug.log
killall -HUP bitcoind
<patch>/bitcoin-abc/build/src/bitcoin-cli -regtest savemempool

Verify that the new debug.log file is empty and debug.log.old continued to be written to

Diff Detail

Repository
rABC Bitcoin ABC
Branch
PR13159
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 7296
Build 12637: Bitcoin ABC Buildbot (legacy)
Build 12636: arc lint + arc unit

Event Timeline

Owners added a reviewer: Restricted Owners Package.Aug 30 2019, 20:53
This revision is now accepted and ready to land.Sep 3 2019, 07:58