请教:sid和sessionid有啥关系吗?

sh/bash/dash/ksh/zsh等Shell脚本
回复
头像
jiandan23
帖子: 94
注册时间: 2010-12-17 22:31
系统: Mint 19.2

请教:sid和sessionid有啥关系吗?

#1

帖子 jiandan23 » 2024-07-23 9:47

请教下,以下两个会话ID有啥关系吗?

[root@xxx ~]# ps
PID TTY TIME CMD
16347 pts/0 00:00:00 bash
19923 pts/0 00:00:00 ps
[root@xxx ~]# ps -o pid,sid 16347
PID SID
16347 16347
[root@xxx ~]# cat /proc/16347/sessionid
25589
头像
astolia
论坛版主
帖子: 6703
注册时间: 2008-09-18 13:11

Re: 请教:sid和sessionid有啥关系吗?

#2

帖子 astolia » 2024-07-23 11:23

没关系。
一个是为了进程分组,man 2 setsid
一个是为了审计登录会话,https://www.kernel.org/doc/Documentatio ... t_loginuid
头像
jiandan23
帖子: 94
注册时间: 2010-12-17 22:31
系统: Mint 19.2

Re: 请教:sid和sessionid有啥关系吗?

#3

帖子 jiandan23 » 2024-07-23 14:55

astolia 写了: 2024-07-23 11:23 没关系。
一个是为了进程分组,man 2 setsid
一个是为了审计登录会话,https://www.kernel.org/doc/Documentatio ... t_loginuid
了解了,谢谢!
回复