Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Nested sh treated differently than MRI #2088

jc00ke opened this Issue · 0 comments

2 participants


@dbussink and I just spent a while digging into #2059 and he found the issue. I'm on Ubuntu, which uses dash by default. So /bin/sh is a symlink to /bin/dash. If I change sh to point to /bin/bash then the integration test will pass.

It could be the case that commands like sh -c 'sh -c "exec sleep 100"' should not be allowed to nest calls to sh like it currently does. Looks like MRI takes care to not execute nested sh's.

Notes: Process.perform_exec, MRI's execv

uname -a
Linux chino 3.5.0-19-generic #30-Ubuntu SMP Tue Nov 13 17:48:01 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

rbx f76d3f6

@dbussink dbussink closed this issue from a commit
@dbussink dbussink Reuse shell fallback code for exec()
We had three places where we determined sh fallback or not. This unifies
this to a single place. It also makes Process.exec able to handle a
string directly and determine itself whether it needs a shell or not.

Fixes #2088
@dbussink dbussink closed this in 2ea9978
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.