summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Ahltorp <map@kth.se>2015-03-31 19:36:23 +0200
committerMagnus Ahltorp <map@kth.se>2015-03-31 19:36:23 +0200
commit5f1ca96ffc4374fd869a0d76ed160e22311ab491 (patch)
treee854b29ae7f24c201c1ffdd62d70123774cad0e1
parentab924f51f254d1bdd6f752f8c19c4cbcc55cf0e4 (diff)
parent8c5b1dbba571456e3b68bcf25e4ca9db9b7b669b (diff)
Merge branch 'genauthkeys'HEADmaster
-rwxr-xr-xtools/halt.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/halt.py b/tools/halt.py
index cfbf14e..0cb43ed 100755
--- a/tools/halt.py
+++ b/tools/halt.py
@@ -7,6 +7,7 @@
import argparse
import subprocess
import sys
+import select
parser = argparse.ArgumentParser(description='')
parser.add_argument('toerl')
@@ -16,4 +17,8 @@ args = parser.parse_args()
p = subprocess.Popen(
[args.toerl, args.nodedir],
stdin=subprocess.PIPE)
-p.communicate("halt().\n")
+p.stdin.write("halt().\n")
+p.stdin.flush()
+select.select([], [], [], 0.5)
+p.stdin.close()
+p.wait()