Linux leaves the session's controlling terminal in place after the last file
descriptor on the slave is closed, so a later open of /dev/tty succeeds.
FreeBSD drops the session vnode reference on that close. /dev/tty then fails,
which breaks Linux programs such as xterm that close the pty slave during startup
and expect /dev/tty to keep working.
When the closer is a Linux process, leave the session reference in place.
Still pass FLASTCLOSE to the driver so the master sees hangup.
Native close behavior is unchanged.