zopencommunity / perlport

Port of perl to z/OS
Apache License 2.0
6 stars 3 forks source link

sh -c of uname command prints out EBCDIC in ASCII build #26

Closed MikeFultonDev closed 1 year ago

MikeFultonDev commented 2 years ago

osname.pl:

eval "chop (\$osname = `sh -c 'uname -nmsr 2>&1'`)";
print $osname;

perl osname.pl should print out the ASCII uname with the newline on the end dropped. It doesn't. This comes from GNU make testing system.

This does work:

eval "chop (\$osname = `uname -nmsr 2>&1`)";
print $osname;
IgorTodorovskiIBM commented 2 years ago

Seems to be an issue with the tag of the STDERR fd. Doing this makes it passes: _TAG_REDIR_ERR= ./perl osname.pl Looks likes there's double conversion at some point. Also, by removing 2>&1, it passes.

MikeFultonDev commented 2 years ago

you know more of perl than me now so transferring this over to you (hopefully fixed now?)

MikeFultonDev commented 1 year ago

fixed awhile ago