Go back to using subprocess.Popen for :restart

With subprocess.run, we wait until the subprocess has completed, which means the
parent process will hang on :restart.

Since we *don't* want to wait for the subprocess here, using subprocess.Popen
seems the right thing to do.

This was introduced in bb54a954fe / #3203
Probably doesn't affect #3210 and #3220.
This commit is contained in:
Florian Bruhin 2017-11-06 07:43:47 +01:00
parent 22f3fade24
commit 4d8ac7486c

View File

@ -660,9 +660,9 @@ class Quitter:
try:
args, cwd = self._get_restart_args(pages, session, override_args)
if cwd is None:
subprocess.run(args)
subprocess.Popen(args)
else:
subprocess.run(args, cwd=cwd)
subprocess.Popen(args, cwd=cwd)
except OSError:
log.destroy.exception("Failed to restart")
return False