keithw/mosh — pull request #199 by saurik (2012-04-16 21:16:31+00:00)
Title: Use _PATH_BSHELL for "/bin/sh" and fix argv[0].

The previous code had the following issues:

1) hardcoded the path of /bin/sh (should use paths.h)
2) threw away the variable with the fallback shell
3) prepended - to the path rather than the shell name
4) added a - before explicit chosen non-shell commands

added:

With this patch, the behavior of what is seen in output of ps, as well as what is reported by the shell itself, now matches what is seen when using openssh.