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

Fixes in offload-glx / offload-vulkan #21

Merged
merged 4 commits into from
Aug 31, 2021

Conversation

blechta
Copy link
Contributor

@blechta blechta commented Aug 18, 2020

This PR fixes two issues:

  1. Fix handling of white space in arguments for offload-glx / offload-vulkan

before the patch:

$ offload-glx bash -c 'echo this should be printed'
offload-glx: launched.
  - nvidia-settings and prime-select detected.
  - prime-supported: Yes
offload-glx: NVIDIA Optimus supported.
Checking: on-demand
  - on-demand loaded: n/a
  - prime-supported: Yes
  - nvidia-detector: nvidia-driver-440
  - prime-select: on-demand detected.
  - xrandr: NVIDIA GPU screen detected.
  - on-demand: is supported
offload-glx: NVIDIA On-Demand is enabled.
offload-glx: Launching "bash -c echo this should be printed" with NVIDIA offload.

after the patch:

$ offload-glx bash -c 'echo this should be printed'
offload-glx: launched.
  - nvidia-settings and prime-select detected.
  - prime-supported: Yes
offload-glx: NVIDIA Optimus supported.
Checking: on-demand
  - on-demand loaded: n/a
  - prime-supported: Yes
  - nvidia-detector: nvidia-driver-440
  - prime-select: on-demand detected. tt 
  - on-demand: is supported
offload-glx: NVIDIA On-Demand is enabled.
offload-glx: Launching ['bash', '-c', 'echo this should be printed'] with NVIDIA offload.
this should be printed

  1. Use exec instead of popen in offload-glx / offload-vulkan. This ensures that the wrapper is terminated and replaced by the target process, thus preventing any undesired interaction.

MWE:

offload-glx bash -c 'trap "echo got ctrl+c but will not quit" SIGINT; while true; do :; done'

This program should keep running after hitting CTRL+C, which is ensured by this patch.

…lkan

MWE:
```
offload-glx bash -c 'echo this should be printed'
```
This ensures that the wrapper is terminated and replace by the
target process, thus preventing any undesired interaction. MWE:

```
offload-glx bash -c 'trap "echo got ctrl+c but will not quit" SIGINT; while true; do :; done'
```
@blechta blechta marked this pull request as ready for review August 18, 2020 15:06
@blechta
Copy link
Contributor Author

blechta commented Aug 28, 2020

@flexiondotorg, could you have a look? 😃

@flexiondotorg
Copy link
Member

Thank you for contributing!

@flexiondotorg flexiondotorg merged commit 1b483fc into ubuntu-mate:master Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants