-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cat issue with untagged text #68
Comments
@HarithaIBM I think this is related to the issue you were investigating (zoslib macros were not being passed in the builds). |
|
I ran |
Never used upgrade with -r before. Hung up after the Download complete message. bash-5.2$ zopen upgrade coreutils -r
-- Had to Ctrl-c, then: -- bash-5.2$ which cat bash-5.2$ ls -T /SYSF/etc/sshd.pid
bash-5.2$ cat /SYSF/etc/sshd.pid bash-5.2$ /bin/cat /SYSF/etc/sshd.pid |
Ok, so looks like issue is with heuristic. We will fix it. But, if you know the file is in EBCDIC then you can set |
When OpenSSH starts, it creates the file containing the PID. It's untagged and in EBCDIC. 09:01:50 RC=(0) [SYSA] bash-5.2$ ls -T /SYSE/etc/sshd.pid untagged T=off /SYSE/etc/sshd.pid 09:01:59 RC=(0) [SYSA] bash-5.2$ ls -T /SYSF/etc/sshd.pid untagged T=off /SYSF/etc/sshd.pid |
Coreutils is linked with zoslib which applies heuristics to guess the encoding of untagged files (default behaviour). You can change the default to avoid the heuristic by setting:
When there is not enough content in the file, the heuristic fails. We'll need to examine this in more detail - I think it's a bug in the heuristic of zoslib. |
Looks good...closing |
Sorry, I forgot to ask...do you plan to include export __UNTAGGED_READ_MODE=ASCII in zoslib? |
I'll look into this, this will be handled via zoslib changes in ibmruntimes/zoslib#58. I'll revisit it this week. |
I was thinking of adding this to /etc/rc file /etc/sshd.pid | grep text | sed 's/:.*text$//' | xargs chtag -tc IBM-1047 thoughts? |
perhaps a bit more complete...could also handle an empty untagged file file /etc/sshd.pid | grep text | sed 's/:.*text$//' | xargs ls -T | grep untagged | awk '{print $4}' | xargs chtag -tc IBM-1047 |
That would work, also future proof in case it gets tagged as something else in new OS releases. |
09:01:47 RC=(0) [SYSA] bash-5.2$ which cat
/hewitt/zopentools/zopen_repo/usr/local/bin/cat
09:01:50 RC=(0) [SYSA] bash-5.2$ ls -T /SYSE/etc/sshd.pid
09:01:53 RC=(0) [SYSA] bash-5.2$ cat /SYSE/etc/sshd.pid
50397225
09:01:59 RC=(0) [SYSA] bash-5.2$ ls -T /SYSF/etc/sshd.pid
09:02:09 RC=(0) [SYSA] bash-5.2$ cat /SYSF/etc/sshd.pid
▒▒▒▒▒▒09:02:18 RC=(0) [SYSA] bash-5.2$
--
09:03:46 RC=(0) [SYSA] bash-5.2$ file /SYSE/etc/sshd.pid
/SYSE/etc/sshd.pid: text
09:03:59 RC=(0) [SYSA] bash-5.2$ file /SYSF/etc/sshd.pid
/SYSF/etc/sshd.pid: text
The text was updated successfully, but these errors were encountered: