Mercurial > hg > truffle
diff mxtool/mx.py @ 14153:e328f28f7401
fix for mx, did not compile on Windows
author | Christian Wirth <christian.wirth@oracle.com> |
---|---|
date | Wed, 12 Mar 2014 11:23:56 +0100 |
parents | 38c0db058dcd |
children | e666c172c9aa |
line wrap: on
line diff
--- a/mxtool/mx.py Wed Mar 12 11:06:27 2014 +0100 +++ b/mxtool/mx.py Wed Mar 12 11:23:56 2014 +0100 @@ -356,7 +356,7 @@ f.write(_sha1OfFile()) def _sha1OfFile(): - with open(path, 'r') as f: + with open(path, 'rb') as f: return hashlib.sha1(f.read()).hexdigest() @@ -1093,7 +1093,7 @@ def run_java(args, nonZeroIsFatal=True, out=None, err=None, cwd=None, addDefaultArgs=True): return run(java().format_cmd(args, addDefaultArgs), nonZeroIsFatal=nonZeroIsFatal, out=out, err=err, cwd=cwd) -def _kill_process_group(pid, sig=signal.SIGKILL): +def _kill_process_group(pid, sig): pgid = os.getpgid(pid) try: os.killpg(pgid, sig) @@ -1498,7 +1498,7 @@ if get_os() == 'windows': p.kill() else: - _kill_process_group(p.pid) + _kill_process_group(p.pid, signal.SIGKILL) raise SystemExit(codeOrMessage) @@ -4088,7 +4088,8 @@ def quit_handler(signum, frame): _send_sigquit() - signal.signal(signal.SIGQUIT, quit_handler) + if get_os() != 'windows': + signal.signal(signal.SIGQUIT, quit_handler) try: if opts.timeout != 0: