diff options
author | tanimura <tanimura@FreeBSD.org> | 2002-01-19 05:31:51 +0000 |
---|---|---|
committer | tanimura <tanimura@FreeBSD.org> | 2002-01-19 05:31:51 +0000 |
commit | dbbd2af1a32f1211e17cc4287a405da1905d84a8 (patch) | |
tree | 2f840d323130885777bec7f899952318e134a526 /sys/compat/svr4 | |
parent | 822099d246b76b3f09085acb88b49c1fea782967 (diff) | |
download | FreeBSD-src-dbbd2af1a32f1211e17cc4287a405da1905d84a8.zip FreeBSD-src-dbbd2af1a32f1211e17cc4287a405da1905d84a8.tar.gz |
For getsid(), return the sid stored in struct session. This prevents
panic in case where a session has no session leader.
Inspired by: Solaris 8
Diffstat (limited to 'sys/compat/svr4')
-rw-r--r-- | sys/compat/svr4/svr4_misc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/compat/svr4/svr4_misc.c b/sys/compat/svr4/svr4_misc.c index 6590ec2..0feebe3 100644 --- a/sys/compat/svr4/svr4_misc.c +++ b/sys/compat/svr4/svr4_misc.c @@ -1028,7 +1028,7 @@ svr4_sys_pgrpsys(td, uap) * This has already been initialized to the pid of * the session leader. */ - *retval = (register_t) p->p_session->s_leader->p_pid; + *retval = (register_t) p->p_session->s_sid; PROC_UNLOCK(p); return 0; |