]> asedeno.scripts.mit.edu Git - PuTTY.git/commit
If pterm's execvp fails when given the whole argument list after -e,
authorSimon Tatham <anakin@pobox.com>
Wed, 11 Jul 2012 18:12:17 +0000 (18:12 +0000)
committerSimon Tatham <anakin@pobox.com>
Wed, 11 Jul 2012 18:12:17 +0000 (18:12 +0000)
commit75239b955ba7cb4843aa7a7e9d2befc4c3f27a27
treed8b8597d6455c3e32931ae479dbe1108a0e72b95
parenta3f74661c8da1b8ac2eb34b0e73fb70172a85b48
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.)

[originally from svn r9575]
unix/uxpty.c