Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Feb 24, 2020. It is now read-only.

Conversation

@samm81
Copy link
Contributor

@samm81 samm81 commented Nov 14, 2017

changes stage1-fly to convert a command name into an absolute path so
that syscall.Exec is able to properly execute it.

solves #3662.

@jyouchan and I worked on this together.

@iaguis
Copy link
Member

iaguis commented Nov 15, 2017

Thanks for the contribution!

This works fine for most cases. However it doesn't follow the spec in the following case:

  • If the image doesn't define a $PATH and the binary to execute is in one of the directories returned by confstr(_CS_PATH), it won't work whereas for the container stage1s it would.

You could check yourself for that case but luckily, we have a function that we use currently for the container flavors that does exactly what we want here. It's in FindBinPath().

Also, it's nice to be using code that's already being used in the container flavors.

changes stage1-fly to convert a command name into an absolute path so
that syscall.Exec is able to properly execute it.
@samm81
Copy link
Contributor Author

samm81 commented Nov 16, 2017

Hi, fixed it up again. @iaguis PTAL!

Copy link
Member

@iaguis iaguis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@iaguis iaguis merged commit d3bda06 into rkt:master Nov 22, 2017
@iaguis iaguis added this to the 1.30.0 milestone Apr 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants