AcademySoftwareFoundation / AcademySoftwareFoundation/rez

add per-shell test for shell termination

Open
#1,251 0 comments 0 reactions 0 assignees View on GitHub
bug enhancement selftest
Dominant language
Python
Stars
1.1k
Forks
374
Avg merge
9d 12h
Merged PRs (30d)
5

Description

### Discussed in https://github.com/nerdvegas/rez/discussions/1250

Originally posted by **johhnry** March 17, 2022
Hi,

We have a render farm setup where we launch renders in a Rez environment like: `rez env houdini -- hrender ...`

The issue we are facing is that when trying to kill a running task on a computer, the visible PID is Rez's one and not `hrender`'s one for example.

I would have thought that killing Rez was killing the subprocess that was spawned but this is not the case and it stills run in the background. This is quite problematic since we launch renders on machines that are not only dedicated to the render farm and users must be able to kill jobs.

My question is: is there a reliable way to kill the child process in a Rez resolved environment?

I noticed that there is the `rez env --new-session` argument but I don't quite understand how it works on Windows and how it might solve our issue (I tried `rez env --new-session maya -- maya` and closed the terminal but nothing happened)

Thanks!

Contributor guide

Open the contributing guide

Research direction

Review the `rez env --new-session` behavior described in the issue and the per-shell termination test requested by the title. Confirm what happens when the Rez process or terminal is closed, and consider the work complete when child processes terminate reliably across the relevant shells.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, shell
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.