mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
Merge pull request #1675 from pypeclub/bugfix/redirect_stdout_from_gui_executable
Ftrack subprocess handle of stdout/stderr
This commit is contained in:
commit
fbe01ab2ac
1 changed files with 10 additions and 1 deletions
|
|
@ -66,7 +66,16 @@ class SocketThread(threading.Thread):
|
||||||
*self.additional_args,
|
*self.additional_args,
|
||||||
str(self.port)
|
str(self.port)
|
||||||
)
|
)
|
||||||
self.subproc = subprocess.Popen(args, env=env, stdin=subprocess.PIPE)
|
kwargs = {
|
||||||
|
"env": env,
|
||||||
|
"stdin": subprocess.PIPE
|
||||||
|
}
|
||||||
|
if not sys.stdout:
|
||||||
|
# Redirect to devnull if stdout is None
|
||||||
|
kwargs["stdout"] = subprocess.DEVNULL
|
||||||
|
kwargs["stderr"] = subprocess.DEVNULL
|
||||||
|
|
||||||
|
self.subproc = subprocess.Popen(args, **kwargs)
|
||||||
|
|
||||||
# Listen for incoming connections
|
# Listen for incoming connections
|
||||||
sock.listen(1)
|
sock.listen(1)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue