saleyn / erlexec

Execute and control OS processes from Erlang/OTP
https://hexdocs.pm/erlexec/readme.html
Other
525 stars 139 forks source link

SHELL definition requirement is not per POSIX standard and is nonsensical #131

Closed i1t closed 4 years ago

i1t commented 4 years ago

Why couldn't erlexec use /bin/sh and drop its requirement to specify SHELL environment variable???

POSIX standard doesn't require SHELL to be defined. One cannot expect this variable to be defined on all/most *nix systems.

saleyn commented 4 years ago

The "nonsensical" reason for relying on this variable is that the POSIX standard explicitely includes it: https://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html

I haven't seen a single *nix system that is not consistent with this standard of setting the SHELL variable by default.

SHELL stores the parent shell for your session. It may not necessarily match the default login shell.

If it is not set for erlexec in your case, possibly your environment that started erl is not correct.