Skip to content
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

dasdls writes on Linux to stdin, does 'write(0,....)' #80

Open
wfjm opened this issue Jun 1, 2018 · 1 comment
Open

dasdls writes on Linux to stdin, does 'write(0,....)' #80

wfjm opened this issue Jun 1, 2018 · 1 comment

Comments

@wfjm
Copy link

wfjm commented Jun 1, 2018

I use dasdls under Linux. First I saw that two lines of the dasdls output can't be redirected to a file, they always show up in the controlling terminal. Only with unbuffer(1) one gets the whole output redirected into a file. The lines are

  HHCDA004I opening mvsres.148 readonly
  HHCDA020I mvsres.148 cyls=560 heads=30 tracks=16800 trklen=19456

Running dasdls under strace(1) gives

  write(2, "Hercules DASD list program Versi"..., 
  write(2, "(c)Copyright 1999-2015 by Roger "..., 
  write(0, "HHCDA004I opening mvsres.148 rea"..., 
  write(0, "HHCDA020I mvsres.148 cyls=560 he"...,
  write(1, "mvsres.148: VOLSER=MVSRES\nZ99999"..., 

So there are writes to stdout and stderr, but also two writes to stdin. The issue can be reproduced with the current HEAD (commit 59f0556) and can be traced to

The logic of log_write finally poduces somehow a write(0,...) in the context of dasdls.

The dasdls coming with tk4- exhibits the same issue, while the dasdls from hercules-390/hyperion does no writes to stdin.

@Fish-Git
Copy link
Contributor

Fish-Git commented Jun 1, 2018

... while the dasdls from hercules-390/hyperion does no writes to stdin.

FWIW, neither does SoftDevLabs's Fish-Git Hyperion either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants