If pterm's execvp fails when given the whole argument list after -e,
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Wed, 11 Jul 2012 18:12:17 +0000 (18:12 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Wed, 11 Jul 2012 18:12:17 +0000 (18:12 +0000)
commit34826e4ae9c6255d70c702704f5f6c3874b1e3ff
treed8b8597d6455c3e32931ae479dbe1108a0e72b95
parent8df5b84fdf848119a9e2ba5e5a60846b6eab9886
If pterm's execvp fails when given the whole argument list after -e,
and the argument list contains only one string, try again by passing
that single string to "$SHELL -c" to be parsed as a shell command.
This matches xterm's behaviour (as of xterm 261, at least), and means
in practice that users can do _either_ of 'pterm -e some command' and
'pterm -e "some command"'.

(A quick survey suggests that the majority of X terminal programs agree
with pterm's old behaviour of only supporting '-e some command',
except that gnome-terminal only supports the other behaviour and xterm
supports both. With that disagreement, I think supporting both is
probably the sensible thing.)

git-svn-id: svn://svn.tartarus.org/sgt/putty@9575 cda61777-01e9-0310-a592-d414129be87e
unix/uxpty.c