forked from Github/frigate
Set titles for forked processes
This commit is contained in:
committed by
Blake Blackshear
parent
76403bba8e
commit
4619836122
@@ -6,6 +6,7 @@ import signal
|
||||
import queue
|
||||
import multiprocessing as mp
|
||||
from logging import handlers
|
||||
from setproctitle import setproctitle
|
||||
|
||||
|
||||
def listener_configurer():
|
||||
@@ -31,6 +32,7 @@ def log_process(log_queue):
|
||||
signal.signal(signal.SIGINT, receiveSignal)
|
||||
|
||||
threading.current_thread().name = f"logger"
|
||||
setproctitle("frigate.logger")
|
||||
listener_configurer()
|
||||
while True:
|
||||
if stop_event.is_set() and log_queue.empty():
|
||||
@@ -72,4 +74,4 @@ class LogPipe(threading.Thread):
|
||||
def close(self):
|
||||
"""Close the write end of the pipe.
|
||||
"""
|
||||
os.close(self.fdWrite)
|
||||
os.close(self.fdWrite)
|
||||
|
||||
Reference in New Issue
Block a user