The text 583dfb5c18ed, as FreeBSD 10.1-RELEASE shipped it.
get process session
getsid(2) on FreeBSD now