mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-29 02:52:13 +00:00
Merge pull request #66334 from aalexfvk/watchdog_keeps_unlinked_logs
Watchdog keeps descriptors of unlinked log files
This commit is contained in:
commit
5ce0675de8
@ -1306,6 +1306,10 @@ void BaseDaemon::setupWatchdog()
|
|||||||
int status = 0;
|
int status = 0;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
// Close log files to prevent keeping descriptors of unlinked rotated files.
|
||||||
|
// On next log write files will be reopened.
|
||||||
|
closeLogs(logger());
|
||||||
|
|
||||||
if (-1 != waitpid(pid, &status, WUNTRACED | WCONTINUED) || errno == ECHILD)
|
if (-1 != waitpid(pid, &status, WUNTRACED | WCONTINUED) || errno == ECHILD)
|
||||||
{
|
{
|
||||||
if (WIFSTOPPED(status))
|
if (WIFSTOPPED(status))
|
||||||
|
Loading…
Reference in New Issue
Block a user