Classifying this as a bug, which maybe isn't strictly accurate, but it definitely impacted our use of einhorn.
We had an issue today using einhorn's preloading where the preloaded code would modify environment variables in a way that changed einhorn's behavior when it re-exec'd itself on upgrade (specifically, changing RUBYOPT and BUNDLE_GEMFILE).
I think the right thing for einhorn to do in this situation is to save its environment at startup as part of its state and then restore that environment just before it re-exec's itself.
Store the environment at startup and restore it before reexecing
This makes sure that pre-loaded code isn't able to change the
environment in ways that impact subsequent restarts of einhorn (for
instance by repointing bundler to look at a different Gemfile).
Fixes einhorn issue #7
This was actually fixed when #9 got merged. Closing