AppleScript - . UNID pid thePID, . do shell script , . , , pwd.
tell application "System Events"
set theName to name of first process whose unix id is thePID
end tell
tell application theName
do shell script "/bin/pwd"
end tell
script , AppleEvent (, POSIX).