From 331649e85cf3b0cc13c1bf7d9a297c306e0739bb Mon Sep 17 00:00:00 2001 From: Matthew Stratford Date: Fri, 30 Oct 2020 23:14:29 +0000 Subject: [PATCH] Give players and server process titles (in theory) --- player.py | 4 +++- server.py | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/player.py b/player.py index 0d4f2d1..bdd0751 100644 --- a/player.py +++ b/player.py @@ -237,7 +237,9 @@ class Player(): def __init__(self, channel, in_q, out_q): - setproctitle.setproctitle("BAPSicle - Player " + str(channel)) + process_title = "Player: Channel " + str(channel) + setproctitle.setproctitle(process_title) + multiprocessing.current_process().name = process_title self.running = True self.out_q = out_q diff --git a/server.py b/server.py index f35c1e4..f0361af 100644 --- a/server.py +++ b/server.py @@ -9,7 +9,13 @@ setproctitle.setproctitle("BAPSicle - Server") class BAPSicleServer(): + def __init__(self): + + process_title = "Server" + setproctitle.setproctitle(process_title) + multiprocessing.current_process().name = process_title + startServer() def __del__(self):