Skip to content

Commit

Permalink
fix: use devnull for stderr pipe to dcm process handle
Browse files Browse the repository at this point in the history
Signed-off-by: Sheeshpaul <[email protected]>
  • Loading branch information
spkamboj committed Jul 30, 2024
1 parent a77fee8 commit d3d778c
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/deadline/client/api/_loginout.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,12 @@ def _login_deadline_cloud_monitor(
# We don't hookup to stdin but do this to avoid issues on windows
# See https://docs.python.org/3/library/subprocess.html#subprocess.STARTUPINFO.lpAttributeList
p = subprocess.Popen(
args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, stdin=subprocess.PIPE
args, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, stdin=subprocess.PIPE
)
else:
p = subprocess.Popen(
args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, stdin=subprocess.DEVNULL
args, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, stdin=subprocess.DEVNULL
)
# Linux takes time to start DCM binary, which causes the TTY to suspend the process and send it to background job
# With wait here, the DCM binary starts and TTY does not suspend the deadline process.
if sys.platform == "linux":
time.sleep(0.5)
except FileNotFoundError:
raise DeadlineOperationError(
f"Could not find Deadline Cloud monitor at {deadline_cloud_monitor_path}. "
Expand Down

0 comments on commit d3d778c

Please sign in to comment.