-
Notifications
You must be signed in to change notification settings - Fork 326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP No more "Terminate Batch Job? (Y/N)" - Take 2 #627
WIP No more "Terminate Batch Job? (Y/N)" - Take 2 #627
Conversation
Windows doesn't support os.killpg
From cmd.exe -> rez_shell.bat -> you To cmd.exe -> you
E.g. rez env python-3 -- python -c "print('hello')" Previously, the ' character would get swapped for a quadruple-" which breaks everything
You're welcome! Except FYI keep in mind this has significant effects on a Windows environment, including use via the API. It shifts the process hierarchy created when creating a context. I've done my best to evaluate this, but then I only have so many environment to test in. I would consider this BETA until more testing in real environments has happened. |
I noticed the alteration to the proc hierarchy, hence the minor version
update (as opposed to patch) to at least nod to that fact this PR does more
than may have been apparent.
I'll add to the release notes to highlight that Windows users should take
note.
Thx
A
…On Wed, Jul 10, 2019 at 9:08 PM Marcus Ottosson ***@***.***> wrote:
You're welcome!
Except FYI keep in mind this has significant effects on a Windows
environment, including use via the API. It shifts the process hierarchy
created when creating a context. I've done my best to evaluate this, but
then I only have so many environment to test in. I would consider this BETA
until more testing in real environments has happened.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#627>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAMOUSQE6EJY7AZT7TVCJEDP6W7LNANCNFSM4HMLGVPA>
.
|
@mottosso Could you please elaborate a bit more? |
The key difference is that arguments made via E.g. rez env mypackage -- my_command --with-an "argument" Was previously turned into: rem Start of context.bat
set KEY=valueA;%KEY%
set KEY=valueB;%KEY%
set KEY=valueC;%KEY%
...
rem Coming in from `--`
my_command --with-an "argument"
rem Finally, yielding control back to the user
cmd /K Where that final The crux is with this Finally, because there is one level of processes less, if you had anything that depended on that, then you would need to update it. For example, if you got to the
It may very well cripple any and all use of Rez, as it's affecting the point at which contexts are generated and entered. Buyer beware. At least we'll get some good testing going now that it's released into the wild and can hopefully either confirm that it works or fix it more quickly. |
Cool, thanks for the heads up! |
Bugfix.
I found a better way to accomplish #626.
cmd.exe
subshell followed by anothercmd.exe
subshell with the environment set up calledrez_shell.bat
cmd.exe
subshell, callingrez_shell.bat
which then exits and puts the user in the original subshell.The result is the same features and benefits, but one less layer to worry about. Most importantly, ctrl+c from a subshell doesn't exhibit the .bat prompt.
Before
After
And, wouldn't you know it, this also solved #616, making
cmd.exe
a much better experience. Win!