Skip to content

Comments

reexec: Use in-memory binary /proc/self/exe on linux instead of os.Args[0]#14964

Merged
LK4D4 merged 1 commit intomoby:masterfrom
tiborvass:fix-reexec
Jul 24, 2015
Merged

reexec: Use in-memory binary /proc/self/exe on linux instead of os.Args[0]#14964
LK4D4 merged 1 commit intomoby:masterfrom
tiborvass:fix-reexec

Conversation

@tiborvass
Copy link
Contributor

This keeps reexec working properly even if the on-disk binary was replaced.

Signed-off-by: Tibor Vass [email protected]

Consequently it allows you to test client-only binaries locally:

$ make shell
root@ad752426b4c3:/go/src/github.com/docker/docker# ./hack/make.sh binary; ./bundles/latest/binary/docker -d -D &> /tmp/docker.log & DOCKER_TEST_HOST=unix:///var/run/docker.sock DOCKER_CLIENTONLY=1 ./hack/make.sh binary test-integration-cli 

@tiborvass
Copy link
Contributor Author

Ping @LK4D4 @tianon

@tianon
Copy link
Member

tianon commented Jul 24, 2015

👍 LGTM

@ewindisch
Copy link
Contributor

Testing

@tiborvass tiborvass changed the title reexec: Use in-memory binary on linux instead of os.Args[0] reexec: Use in-memory binary /proc/self/exe on linux instead of os.Args[0] Jul 24, 2015
@LK4D4
Copy link
Contributor

LK4D4 commented Jul 24, 2015

@tiborvass Would you mind to replace reexec.Self() with this in daemon/execdriver/native/driver.go? Maybe it should be something like reexec.Exe
EDIT: we just need to replace reexec.Self to fix all the places.

@ewindisch
Copy link
Contributor

Works without breaking the LSM. LGTM

This keeps reexec working properly even if the on-disk binary was replaced.

Signed-off-by: Tibor Vass <[email protected]>
@tiborvass
Copy link
Contributor Author

Updated to have Self() return "/proc/self/exe" on linux.

@LK4D4
Copy link
Contributor

LK4D4 commented Jul 24, 2015

LGTM

LK4D4 added a commit that referenced this pull request Jul 24, 2015
reexec: Use in-memory binary /proc/self/exe on linux instead of os.Args[0]
@LK4D4 LK4D4 merged commit 44e327b into moby:master Jul 24, 2015
@tiborvass tiborvass deleted the fix-reexec branch July 17, 2019 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants