This issue was solved with changeset r37825.
Fumiyasu, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
process.c (proc_getsid): adds new method for getting session id.
Contributed from fumiyas (Fumiyasu SATOH). Thank you!
[Feature #6757] [ruby-dev:45977]
configure.in: adds getsid check.
test/ruby/test_process.rb (TestProcess#test_setsid): new test
for the above.