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

Improve handling of processes with single argument #70

Merged
merged 1 commit into from
Nov 19, 2019

Conversation

JonnyHaystack
Copy link
Owner

Previously I would do shlex.split(cmdline[0]) if the cmdline had only one argument. This would break single argument processes with spaces in the executable path.

Now I check both that the cmdline has one argument and that that argument is an executable (using shutil.which()).

This means now it will only fail for relative executable paths with spaces in them, which should be very uncommon.

Previously I would do shlex.split(cmdline[0]) if the cmdline had only
one argument. This would break single argument processes with spaces in
the executable path. Now I check both that the cmdline has one argument
and that that argument is an executable (using shutil.which()). This
means now it will only fail for relative executable paths with spaces in
them, which should be very uncommon.
@JonnyHaystack JonnyHaystack added the bug Something isn't working label Nov 19, 2019
@JonnyHaystack JonnyHaystack added this to the 1.4.1 milestone Nov 19, 2019
@JonnyHaystack JonnyHaystack self-assigned this Nov 19, 2019
@JonnyHaystack JonnyHaystack merged commit 67290f8 into master Nov 19, 2019
@JonnyHaystack JonnyHaystack deleted the bugfix/improve_modified_cmdline_workaround branch May 12, 2020 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant