hello Jim, your script reads the tty associated with the file descriptors, while I am looking for a way to get the tty controlling a certain process. I don't know much about this argument but it seems to me these are not necessarily the same. cheers Il giorno dom 8 gen 2023 alle 22:18 Jim ha scritto: > > On Sat, Jan 7, 2023 at 10:44 PM Pier Paolo Grassi > 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//fd/0 2>/dev/null > 25189 12199 17227 pts/40 man > 25198 25189 17227 pipe man > 25199 25189 17227 pipe less > zstat +link /proc//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 >