Determine pts/3 as terminal name if path is /dev/pts/3.