mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-23 18:54:42 +01:00
...
This commit is contained in:
parent
24a6174362
commit
2b38f42c7d
1 changed files with 2 additions and 3 deletions
|
|
@ -355,7 +355,7 @@ def initialize(self, *args):
|
|||
|
||||
def set_restarting_env_var():
|
||||
if iswindows:
|
||||
ctime = plugins['winutil'][0].get_process_times(None)[0]
|
||||
ctime = winutil.get_process_times(None)[0]
|
||||
os.environ['CALIBRE_RESTARTING_FROM_GUI'] = str(ctime)
|
||||
else:
|
||||
os.environ['CALIBRE_RESTARTING_FROM_GUI'] = str(os.getpid())
|
||||
|
|
@ -525,11 +525,10 @@ def create_listener():
|
|||
def wait_for_parent_to_die(ppid, max_wait=10):
|
||||
ppid = int(ppid)
|
||||
if iswindows:
|
||||
get_process_times = plugins['winutil'][0].get_process_times
|
||||
|
||||
def parent_done():
|
||||
try:
|
||||
ctime = get_process_times(os.getppid())[0]
|
||||
ctime = winutil.get_process_times(os.getppid())[0]
|
||||
except Exception:
|
||||
return True
|
||||
return ctime > ppid
|
||||
|
|
|
|||
Loading…
Reference in a new issue