Skip to content
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

Fix restart shell after timeout #22

Merged
merged 5 commits into from
Apr 21, 2022
Merged

Fix restart shell after timeout #22

merged 5 commits into from
Apr 21, 2022

Conversation

SRombautsU
Copy link

Improve internal _ExitBackgroundCommandLineShell(), use it for _RestartBackgroundCommandLineShell(), and use this one in case of Timeout

  • Check the ShellProcessHandle inside the function instead of outside
  • Check if IsProcessRunning() before calling "exit"
  • Don't use _RunCommandInternal() anymore so we don't risk recursive calls, directly write to the pipe
  • Warn if the shell didn't exit in time, before killing it

Also add #ifdef UE4 around CreatePipeWrite() now that UE5 support it correctly

… using it in case of a timeout

- Check the ShellProcessHandle inside the function instead of outside
- Check if IsProcessRunning() before calling "exit"
- Don't use _RunCommandInternal() anymore so we don't risk recursive calls, directly write to the pipe
- Warn if the shell didn't exit in time, before killing it
…ags in FPlatformProcess::CreatePipe()

This has been fixed in January 2022 for UE 5.0
And in any case, it will be restarted if needed inside _RunCommandInternal()
@SRombautsU SRombautsU added the bug label Apr 20, 2022
@SRombautsU SRombautsU self-assigned this Apr 20, 2022
@SRombautsU SRombautsU merged commit 27890e1 into PlasticSCM:master Apr 21, 2022
@SRombautsU SRombautsU deleted the fix-restart-shell-after-timeout branch April 21, 2022 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants