mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-24 00:04:23 +03:00
fixed pipe and zoombie problems
1.we don't need stdin here, and it'll cause OSError: too many openfiles problem. 2. after using /scan/taskid/stop , process turned into a zoombie, need add wait()
This commit is contained in:
parent
62f35698ee
commit
1ac27e9305
|
@ -155,11 +155,12 @@ class Task(object):
|
||||||
|
|
||||||
def engine_start(self):
|
def engine_start(self):
|
||||||
self.process = Popen(["python", "sqlmap.py", "--pickled-options", base64pickle(self.options)],
|
self.process = Popen(["python", "sqlmap.py", "--pickled-options", base64pickle(self.options)],
|
||||||
shell=False, stdin=PIPE, close_fds=not IS_WIN)
|
shell=False, close_fds=not IS_WIN)
|
||||||
|
|
||||||
def engine_stop(self):
|
def engine_stop(self):
|
||||||
if self.process:
|
if self.process:
|
||||||
return self.process.terminate()
|
self.process.terminate()
|
||||||
|
return self.process.wait()
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
@ -168,7 +169,8 @@ class Task(object):
|
||||||
|
|
||||||
def engine_kill(self):
|
def engine_kill(self):
|
||||||
if self.process:
|
if self.process:
|
||||||
return self.process.kill()
|
self.process.kill()
|
||||||
|
return self.process.wait()
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user