mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Do not use watchdog when server is run from tty
This commit is contained in:
parent
e169b39fa7
commit
fdc8950fbe
@ -104,7 +104,12 @@ namespace CurrentMetrics
|
||||
int mainEntryClickHouseServer(int argc, char ** argv)
|
||||
{
|
||||
DB::Server app;
|
||||
app.shouldSetupWatchdog(argc ? argv[0] : nullptr);
|
||||
|
||||
/// Do not fork separate process from watchdog if we attached to terminal.
|
||||
/// Otherwise it breaks gdb usage.
|
||||
if (argc > 0 && !isatty(STDIN_FILENO) && !isatty(STDOUT_FILENO) && !isatty(STDERR_FILENO))
|
||||
app.shouldSetupWatchdog(argv[0]);
|
||||
|
||||
try
|
||||
{
|
||||
return app.run(argc, argv);
|
||||
|
Loading…
Reference in New Issue
Block a user