From 9eb1855add1cf1e988f48233cb161cc0ecd1708a Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Tue, 26 Jun 2018 12:10:15 -0400 Subject: [PATCH] Revert "[#3] Fix up some oddness" This reverts commit c5a7ac073849d580c9adb71aa00d9302fb30d5aa. --- pvcd.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pvcd.py b/pvcd.py index 447b5c1f..1084a2f0 100755 --- a/pvcd.py +++ b/pvcd.py @@ -143,7 +143,7 @@ zk_conn.add_listener(zk_listener) # Cleanup function def cleanup(): - ansiiprint.echo('Clearing daemon', '', 'w') + ansiiprint.echo('Terminating daemon', '', 'e') # Set stop state in Zookeeper zk_conn.set('/nodes/{}/daemonstate'.format(myhostname), 'stop'.encode('ascii')) # Close the Zookeeper connection @@ -158,7 +158,7 @@ def flush(): # Shutdown function def dshutdown(signum, frame): - ansiiprint.echo('Flushing this node', '', 'w') + ansiiprint.echo('Flushing this node', '', 'e') flush() ansiiprint.echo('NOTE: This node must be unflushed by the administrator after daemon startup', '', 'i') cleanup() @@ -168,7 +168,7 @@ def dshutdown(signum, frame): def dreload(signum, frame): cleanup() python = sys.executable - os.exec(python, python, *sys.argv) + os.execl(python, python, *sys.argv) # Handle signals gracefully signal.signal(signal.SIGTERM, dshutdown)