first attempt to have --os-pwn and other takeover switches work across Windows and Linux - issue #28

This commit is contained in:
Bernardo Damele
2013-01-09 16:04:23 +00:00
parent c44a829b9b
commit 510ceb6e19
4 changed files with 214 additions and 65 deletions

View File

@@ -3309,3 +3309,21 @@ def isNumber(value):
return False
else:
return True
def pollProcess(process, suppress_errors=False):
while True:
dataToStdout(".")
time.sleep(1)
returncode = process.poll()
if returncode is not None:
if not suppress_errors:
if returncode == 0:
dataToStdout(" done\n")
elif returncode < 0:
dataToStdout(" process terminated by signal %d\n" % returncode)
elif returncode > 0:
dataToStdout(" quit unexpectedly with return code %d\n" % returncode)
break