mapping tty_nr to tty name (not using shell tool like ps, only C code and system calls)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, 

 

How is it that the ps utility maps the tty_nr from /proc/PID/stat field to
the tty name?

 

Is there a way to do this mapping using C code and only system calls (2)?

 

Or, given a PID, how do I find the tty name associated with this process
without ps, only with C code and system calls (2)? Or how ps does it?

 

Cheers

 

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux