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

Unix ForkExec doesn't work with spaces in binary #46

Closed
mitchellh opened this issue Jan 22, 2013 · 2 comments
Closed

Unix ForkExec doesn't work with spaces in binary #46

mitchellh opened this issue Jan 22, 2013 · 2 comments

Comments

@mitchellh
Copy link
Contributor

I have to use ChildProcess to execute a binary with spaces and fork-exec doesn't work, it errors that the binary doesn't exist (when I actually do a file exists check above which says it does).

I tried with PosixSpawn and it works but I'd rather use fork/exec.

Thanks!

@mitchellh
Copy link
Contributor Author

Workaround: Wrap the binary in single quotes.

I don't know if the fix is as easy as looking for spaces and doing that, but that works for now.

@jarib jarib closed this as completed in 8cce95a Jan 23, 2013
@jarib
Copy link
Collaborator

jarib commented Jan 23, 2013

Just pushed 0.3.7 which should fix this issue.

The problem is with a single argument, we hit this "feature" of Kernel::exec:

If single string is given as the command, it is taken as a command line that is subject to shell expansion before being executed.

Shouldn't happen again.

thibaudgg added a commit to guard/guard-spork that referenced this issue Jan 30, 2013
ChildProcess change how we need to build process because of
enkessler/childprocess#46
- #107
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

No branches or pull requests

2 participants