Rename the signal handler function to match its actual use.
The realuser local was never used, get rid of it.
Signed-off-by: Gregory Smith <gps@google.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@3356 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/server/autoserv b/server/autoserv
index 303369b..e16a517 100755
--- a/server/autoserv
+++ b/server/autoserv
@@ -23,18 +23,13 @@
os.setpgrp()
# Implement SIGTERM handler
- def handle_sigint(signum, frame):
+ def handle_sigterm(signum, frame):
if pid_file_manager:
pid_file_manager.close_file(1, signal.SIGTERM)
os.killpg(os.getpgrp(), signal.SIGKILL)
# Set signal handler
- signal.signal(signal.SIGTERM, handle_sigint)
-
- # Get a useful value for running 'USER'
- realuser = os.environ.get('USER')
- if not realuser:
- realuser = 'anonymous'
+ signal.signal(signal.SIGTERM, handle_sigterm)
if parser.options.machines:
machines = parser.options.machines.replace(',', ' ').strip().split()