Ignore EOVERFLOW from pstat_getproc(). The HP-UX kernel appears
to return this in certain situations but it appears to be harmless
at least insofar as retrieving the tty goes.
Handle d_type == DT_UNKNOWN when resolving the device to a name.
Don't check the tty of the parent process. Now that we get the
controlling tty device number from the kernel there is no need. If
the process has really disassociated from the tty then reporting
"unknown" is appropriate.
AIX may have a 64-bit pr_ttydev that we need to convert to 32-bit
before we try to match it against st_rdev.
Break out of the loop if sudo_ttyname_scan() returns non-NULL.
Fixes a problem finding the tty name when it is not in /dev/pts.