From a6fccfb5f2a7f3bf18319226026b803480e4c639 Mon Sep 17 00:00:00 2001 From: Seigo Tanimura Date: Sat, 19 Jan 2002 05:31:51 +0000 Subject: [PATCH] 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 --- sys/compat/svr4/svr4_misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/svr4/svr4_misc.c b/sys/compat/svr4/svr4_misc.c index 6590ec272d75..0feebe3ab220 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;