procps/proc
Simon Tatham f888a30d23 library: find tty device name of process quicker
The procps library attempts to work out the tty of a process
through several methods. For things like /dev/tty123 or
/dev/foo it works fine.

For tty devices that put the minor number in a directory
of the major name this fails. So then we have to fallback
to stating things like the processes STDERR and try again.

Considering a lot of processes sit on ttys such as
/dev/pts/3 this is a lot of wasted time. At the point of
entering driver_name we know "/dev/pts" and we know "3"
we just didn't join them up the right way as this is old
code.

This change now looks for /dev/pts/3 as well. It does it
after looking for /dev/pts3 so the behaviour is the same.

References:
 https://bugs.debian.org/770215

Signed-off-by: Craig Small <csmall@enc.com.au>
2016-07-03 10:47:25 +10:00
..
.gitignore tests: update template and add pids 2016-04-19 21:33:02 +10:00
alloc.c library: cleanup of library includes 2016-04-16 17:03:57 +10:00
alloc.h library: cleanup of library includes 2016-04-16 17:03:57 +10:00
COPYING miscellaneous: clean up trailing whitespace once again 2013-04-07 18:05:01 +10:00
devname.c library: find tty device name of process quicker 2016-07-03 10:47:25 +10:00
devname.h library: cleanup of readproc functions 2016-04-17 14:14:27 +10:00
diskstat.c library: Cater for 32 char device names 2016-07-02 15:01:11 +10:00
diskstat.h library: cleanup of library includes 2016-04-16 17:03:57 +10:00
escape.c library: re-arrange escape commands 2016-04-17 14:45:19 +10:00
escape.h library: re-arrange escape commands 2016-04-17 14:45:19 +10:00
libprocps.pc.in Renaming libprocfs to libprocps 2011-12-23 09:18:43 +11:00
libprocps.sym library: normalize/standardize the i/f, <SLABINFO> api 2016-06-09 20:51:06 +10:00
meminfo.c library: standardize extents_free_all() logic, 3rd gen 2016-07-02 16:33:01 +10:00
meminfo.h library: <MEMINFO> api, changed that 'get' return type 2016-06-21 20:58:09 +10:00
namespace.c miscellaneous: silence a whole bunch of clang warnings 2015-09-21 22:34:27 +10:00
namespace.h library: cleanup of library includes 2016-04-16 17:03:57 +10:00
openproc.3 documentation: fix man pages due to refactor for wchan 2015-06-19 19:09:21 +10:00
pids.c library: refactor exposed pointers management, 3rd gen 2016-07-02 16:33:01 +10:00
pids.h library: more pids_fetch struct opaqueness, <PIDS> api 2016-06-28 21:11:25 +10:00
procps-private.h library: please keep procps-private.h free of #include 2016-06-11 11:50:37 +10:00
procps.h library: rename the 'slab' sources as 'slabinfo' files 2016-06-09 20:51:06 +10:00
pwcache.c library: rename clashing pwcache functions 2016-06-18 08:17:45 +10:00
pwcache.h library: rename clashing pwcache functions 2016-06-18 08:17:45 +10:00
readproc.3 misc: result after checking all files for misspellings 2014-08-08 22:14:21 +02:00
readproc.c library: stop treating lxcname differently, <PIDS> api 2016-07-02 16:33:01 +10:00
readproc.h library: stop treating lxcname differently, <PIDS> api 2016-07-02 16:33:01 +10:00
readproctab.3 misc: result after checking all files for misspellings 2014-08-08 22:14:21 +02:00
slabinfo.c library: refactor exposed pointers management, 3rd gen 2016-07-02 16:33:01 +10:00
slabinfo.h library: <SLABINFO> api, change that 'get' return type 2016-06-21 20:58:09 +10:00
stat.c library: refactor exposed pointers management, 3rd gen 2016-07-02 16:33:01 +10:00
stat.h library: <STAT> api, change for that 'get' return type 2016-06-21 20:58:09 +10:00
sysinfo.c library: correct the procps_pid_length() +1 distortion 2016-04-18 19:29:41 +10:00
sysinfo.h library: remove an obsolete 'jiffs' typedef in sysinfo 2016-05-08 21:12:22 +10:00
test_namespace.c tests: update template and add pids 2016-04-19 21:33:02 +10:00
test_pids.c library: fix new and unref pids test 2016-06-07 21:13:57 +10:00
test_sysinfo.c tests: update template and add pids 2016-04-19 21:33:02 +10:00
test_uptime.c library: procps_uptime() return value is a status 2016-05-01 16:50:25 +10:00
test_version.c library: Fix LINUX_VERSION macro 2016-05-01 17:46:25 +10:00
uptime.c library: procps_uptime() return value is a status 2016-05-01 16:50:25 +10:00
uptime.h library: cleanup of library includes 2016-04-16 17:03:57 +10:00
version.c miscellaneous: remove some trailing whitespace buildup 2015-06-20 07:46:23 +10:00
version.h library: Fix LINUX_VERSION macro 2016-05-01 17:46:25 +10:00
vmstat.c library: standardize extents_free_all() logic, 3rd gen 2016-07-02 16:33:01 +10:00
vmstat.h library: <VMSTAT> api, change in the 'get' return type 2016-06-21 20:58:09 +10:00
wchan.c library: refactor and rely on modern kernels for wchan 2015-06-19 19:09:20 +10:00
wchan.h library: cleanup of library includes 2016-04-16 17:03:57 +10:00