Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: read with redirected stdin




On Sat, Jan 7, 2023 at 10:44 PM Pier Paolo Grassi <pierpaolog@xxxxxxxxx> wrote:
Thanks, I'll check it out.

Pier Paolo Grassi

Not sure this is what you are looking for but in re-reading your original email you mention
checking for pipes. The script I attached  in the earlier email was checking fd 0, so I also
tried checking fd 1.  The results are as follows looking at my /proc. 

zstat +link /proc/<pid>/fd/0 2>/dev/null
25189 12199 17227 pts/40  man
25198 25189 17227 pipe    man
25199 25189 17227 pipe    less
zstat +link /proc/<pid>/fd/1 2>/dev/null
25189 12199 17227 pts/40  man
25198 25189 17227 pipe    man
25199 25189 17227 pts/40  less

Not sure if it will return what you are looking for in your case. The script is also
collecting other info to output the above results.

Regards,

Jim


Messages sorted by: Reverse Date, Date, Thread, Author