Which shell does Perl 6's shell() use? Which shell does Perl 6's shell() use? shell shell

Which shell does Perl 6's shell() use?


Looking at the source, rakudo just calls /bin/sh -c on non-windows and uses %*ENV<ComSpec> /c on windows.


dash (installed as /bin/sh on many systems), doesn't set $SHELL, nor should it. $SHELL isn't the name of the parent process; it's the name of the shell that should be used when an interactive shell is desired.

To get the name of the parent process, you could use the following on some systems:

echo "$0"

or

# Command lineperl -e'$ppid=getppid(); @ARGV="/proc/$ppid/cmdline"; CORE::say "".<>'

or

# Program fileperl -e'$ppid=getppid(); CORE::say readlink("/proc/$ppid/exe")'

You'll find you'll get /bin/sh in all cases.