Set environment variable on remote target
Jie Zhang
jie.zhang@analog.com
Thu Jul 17 08:00:00 GMT 2008
Andreas Schwab wrote:
> Jie Zhang <jie.zhang@analog.com> writes:
>
>> @@ -261,7 +262,11 @@ proc rsh_exec { boardname program pargs inp outp } {
>> set inp "/dev/null"
>> }
>>
>> - set ret [local_exec "$RSH $rsh_useropts $hostname sh -c '$program $pargs \\; echo XYZ\\\${?}ZYX'" $inp $outp $timeout]
>> + set remote_envs ""
>> + foreach envvar [array names remote_env] {
>> + set remote_envs "$remote_envs $envvar=$remote_env($envvar)"
>
> That needs to do proper quoting to protect shell meta characters.
>
Thanks for pointing out this. A new patch is attached. Is the quoting right?
I also dropped remote_getenv from the new patch, since I just realized
it cannot get remote environment variable indeed. remote_unsetenv was
dropped for the same reason.
The patch for gcc is also attached for review.
Jie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dejagnu-remote-env-2.diff
Type: text/x-patch
Size: 1219 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20080717/09d9f8c2/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libmudflap-testsuite-remote-setenv.diff
Type: text/x-patch
Size: 3184 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20080717/09d9f8c2/attachment-0001.bin>
More information about the Gcc
mailing list