@@ -1606,10 +1606,14 @@ def dictionaryAttack(attack_dict):
16061606 process .daemon = True
16071607 process .start ()
16081608
1609- while count .value > 0 :
1609+ while count .value > 0 and any ( _ . is_alive () for _ in processes ) :
16101610 time .sleep (0.5 )
16111611
1612- else :
1612+ if count .value > 0 : # worker(s) died without finishing (e.g. a launcher re-running the main script in 'spawn' workers - #6200)
1613+ _multiprocessing = None
1614+ gc .enable ()
1615+
1616+ if not _multiprocessing :
16131617 warnMsg = "multiprocessing hash cracking is currently "
16141618 warnMsg += "%s on this platform" % ("not supported" if not conf .disableMulti else "disabled" )
16151619 singleTimeWarnMessage (warnMsg )
@@ -1666,10 +1670,14 @@ def dictionaryAttack(attack_dict):
16661670 process .daemon = True
16671671 process .start ()
16681672
1669- while count .value > 0 :
1673+ while count .value > 0 and any ( _ . is_alive () for _ in processes ) :
16701674 time .sleep (0.5 )
16711675
1672- else :
1676+ if count .value > 0 : # worker(s) died without finishing (e.g. a launcher re-running the main script in 'spawn' workers - #6200)
1677+ _multiprocessing = None
1678+ gc .enable ()
1679+
1680+ if not _multiprocessing :
16731681 warnMsg = "multiprocessing hash cracking is currently "
16741682 warnMsg += "%s on this platform" % ("not supported" if not conf .disableMulti else "disabled" )
16751683 singleTimeWarnMessage (warnMsg )
@@ -1738,12 +1746,16 @@ def dictionaryAttack(attack_dict):
17381746 process .daemon = True
17391747 process .start ()
17401748
1741- while count .value > 0 :
1749+ while count .value > 0 and any ( _ . is_alive () for _ in processes ) :
17421750 time .sleep (0.5 )
17431751
17441752 found = found_ .value != 0
17451753
1746- else :
1754+ if count .value > 0 : # worker(s) died without finishing (e.g. a launcher re-running the main script in 'spawn' workers - #6200)
1755+ _multiprocessing = None
1756+ gc .enable ()
1757+
1758+ if not _multiprocessing :
17471759 warnMsg = "multiprocessing hash cracking is currently "
17481760 warnMsg += "%s on this platform" % ("not supported" if not conf .disableMulti else "disabled" )
17491761 singleTimeWarnMessage (warnMsg )
0 commit comments