mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-08 09:30:41 +00:00
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
This commit is contained in:
parent
84e76dff37
commit
a6fccfb5f2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=89541
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue