diff options
author | Magnus Ahltorp <map@kth.se> | 2015-03-31 19:36:23 +0200 |
---|---|---|
committer | Magnus Ahltorp <map@kth.se> | 2015-03-31 19:36:23 +0200 |
commit | 5f1ca96ffc4374fd869a0d76ed160e22311ab491 (patch) | |
tree | e854b29ae7f24c201c1ffdd62d70123774cad0e1 | |
parent | ab924f51f254d1bdd6f752f8c19c4cbcc55cf0e4 (diff) | |
parent | 8c5b1dbba571456e3b68bcf25e4ca9db9b7b669b (diff) |
-rwxr-xr-x | tools/halt.py | 7 |
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() |