From 911be67bb399ba5157d9749c544a517b08f306af Mon Sep 17 00:00:00 2001 From: Faiyaz Ahmed Date: Thu, 17 Aug 2006 20:21:09 +0000 Subject: [PATCH] Sleep for 10 seconds after stoppiing NM; in the off chance NM is working, it takes a bit to stop. --- nm_mom.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nm_mom.py b/nm_mom.py index 574b7c3..dc18817 100755 --- a/nm_mom.py +++ b/nm_mom.py @@ -5,7 +5,7 @@ # Faiyaz Ahmed # Copyright (C) 2006 The Trustees of Princeton University # -# $Id: nm_mom.py,v 1.1 2006/08/17 20:05:24 faiyaza Exp $ +# $Id: nm_mom.py,v 1.2 2006/08/17 20:12:09 faiyaza Exp $ # import syslog @@ -28,6 +28,7 @@ def restartNM(): pid = os.fork() if pid == 0: bwlimit.run("/etc/init.d/pl_nm stop") + time.sleep(10) try: nmpid = bwlimit.run("/bin/ps -e -o pid,cmd | grep nm.py")[0].split(" ")[0] os.kill(int(nmpid), 9) -- 2.43.0