terminal_screen_get_working_dir() not optimal on Solaris 10
Submitted by Danek Duvall
Link to original bug (#151794)
Description
After fixing bug 117775, pwdx is no longer called on Solaris, but because
/proc/<pid>
/cwd is a symlink pointing to nowhere, a dance with chdir() turns out
to be necessary. Starting with Solaris 10, this is no longer necessary, though
the path to the corresponding symlink is different than it is on Linux. Using
this symlink when it's available is a small performance enhancement on Solaris
10 and above, though admittedly it's not in a fast-path.
Resolution: RESOLVED FIXED