Skip to content

Commit

Permalink
Cherry-pick GASNet bug4723 fix : ssh-spawner failures with tcsh (#25313)
Browse files Browse the repository at this point in the history
Cherry-pick [GASNet
fix](https://bitbucket.org/berkeleylab/gasnet/commits/76c8a6a3904d10fe3e9a6d2f3442cf810d00c5a5)
to [bug
4723](https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=4723), which
resolves ssh-spawner failures when using tcsh.

Problem was reproduced on JLSE cascade, and fix confirmed using the
patched Chapel build tree.

[Reviewed by @jhh67]
  • Loading branch information
jhh67 authored Jul 3, 2024
2 parents 5421963 + f6aebc5 commit 2eeeeb6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion third-party/gasnet/README
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ Chapel modifications to GASNet
The modifications that we have made to the official GASNet release are
as follows:

* None
* Cherry-picked 76c8a6a39 - Address bug 4723 in which ssh-spawner chokes tcsh
5 changes: 5 additions & 0 deletions third-party/gasnet/gasnet-src/other/spawner/gasnetrun.pl
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,11 @@ ($)
# Implement -E for ssh, if required, as a wrapper (processed below)
if (($spawner eq 'SSH') && defined $envlist) {
foreach (split(',', $envlist)) {
# Screen both variable names and values for "bad" ones.
# See Bug 4723 for the motivation.
next if ($ENV{$_} =~ m/\n/); # skip value with newline(s), which we cannot portably quote
next unless ($_ =~ m/^[A-Za-z_][A-Za-z0-9_]*$/); # skip invalid variable name

unshift @ARGV, "$_=$ENV{$_}";
}
unshift @ARGV, $ENV{'GASNET_ENVCMD'};
Expand Down

0 comments on commit 2eeeeb6

Please sign in to comment.