summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-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()