mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 03:58:22 +08:00
Fix: Misjudging of subprocess state
due to async output even after "Reason: Finied" printed and a "Warning" instead of "Inactive" displayed on web ui
This commit is contained in:
@@ -26,7 +26,8 @@ class HeadlessCliApplication:
|
||||
finally:
|
||||
self.callback("exited")
|
||||
|
||||
Thread(target=f, daemon=True).start()
|
||||
self.logger = Thread(target=f, daemon=True)
|
||||
self.logger.start()
|
||||
|
||||
def callback(self, line):
|
||||
print(line)
|
||||
|
||||
@@ -19,7 +19,7 @@ else:
|
||||
return True
|
||||
|
||||
|
||||
def orphanSlayer(ppid, spid, kill=""):
|
||||
def main(ppid, spid, kill=""):
|
||||
"""
|
||||
module.webui.process_manager.ProcessManager.stop() uses kill() to stop subprocess
|
||||
and to a large extent it cannot be changed to terminate(), see #883
|
||||
@@ -51,4 +51,4 @@ if __name__ == "__main__":
|
||||
# python orphanSlayer.py 114 514 "docker stop ..."
|
||||
import sys
|
||||
|
||||
orphanSlayer(int(sys.argv[1]), int(sys.argv[2]), sys.argv[3])
|
||||
main(int(sys.argv[1]), int(sys.argv[2]), sys.argv[3])
|
||||
|
||||
Reference in New Issue
Block a user