Commit 35d5b776 by Craig Heffner

Removed multi-process hack from the entropy module.

parent a450bdf6
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
import os import os
import math import math
import zlib import zlib
import multiprocessing
import binwalk.core.common import binwalk.core.common
from binwalk.core.compat import * from binwalk.core.compat import *
from binwalk.core.module import Module, Option, Kwarg from binwalk.core.module import Module, Option, Kwarg
...@@ -113,23 +112,13 @@ class Entropy(Module): ...@@ -113,23 +112,13 @@ class Entropy(Module):
else: else:
self.block_size = None self.block_size = None
def _entropy_sigterm_handler(self, *args):
print ("FUck it all.")
def run(self): def run(self):
# Need to invoke the pyqtgraph stuff via a separate process, as calling pg.exit # If generating a graphical plot, this function will never return, as it invokes
# is pretty much required. pg.exit calls os._exit though, and we don't want to # pg.exit. Calling pg.exit is pretty much required, but pg.exit calls os._exit in
# exit out of the main process (especially if being run via the API). # order to work around QT cleanup issues.
#
# TODO: This is a nasty hack. Find a better way. Until then, just know that
# pg.exit will quite the current process.
if False: #not binwalk.core.common.MSWindows():
p = multiprocessing.Process(target=self._run)
p.start()
p.join()
else:
# There seem to be all kinds of issues using the multiprocessing module in
# Windows, as done above.
#
# This means that when run in Windows, pg.exit will cause binwalk
# to exit.
self._run() self._run()
def _run(self): def _run(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment