ssh-copy-id bugfix
Nico Kadel-Garcia
nkadel at gmail.com
Fri Nov 27 00:45:01 AEDT 2015
On Wed, Nov 25, 2015 at 12:20 PM, Philip Hands <phil at hands.com> wrote:
> Nico Kadel-Garcia <nkadel at gmail.com> writes:
>> What seems to be missing in the patch is a comment line, above the
>> stanza, explaining why the code uses "exec".
>
> My reading of the presence of "exec" there was:
>
> We're assuming that the current shell may not be to our liking, so
> there seems to be little point keeping it in memory solely so it can
> at worst somehow get in the way of a clean exit.
>
> Does that really need a comment? I'm not sure I can make a succinct
> explanation of what's going on for anyone that doesn't already know what
> exec does. Feel free to make suggestions though.
That is _precisely_ why it needs a comment. It's a selection of a
particular technology for a particular reason that someone may not
understand as important without having to dig back to a thread or bug
report like this. For example:
# Use "exec sh -c" to ensure POSIX compliant scripting,
especially for fish and tcsh users
[ "$DRY_RUN" ] || printf '%s\n' "$NEW_IDS" | ssh "$@" "
.....
More information about the openssh-unix-dev
mailing list