Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sys.c Create Date:2022-07-28 09:20:22
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:ksys_setsid

Proto:int ksys_setsid(void)

Type:int

Parameter:Nothing

1160  group_leader = group_leader
1161  sid = task_pid(group_leader)
1162  session = pid_vnr(sid)
1163  err = -EPERM
1165  write_lock_irq( & tasklist_lock)
1167  If leader Then Go to out
1173  If pid_task(sid, PIDTYPE_PGID) Then Go to out
1176  leader = 1
1177  set_special_pids(sid)
1179  proc_clear_tty(group_leader)
1181  err = session
1182  out :
1183  write_unlock_irq( & tasklist_lock)
1184  If err > 0 Then
1185  proc_sid_connector(group_leader)
1186  sched_autogroup_create_attach(group_leader)
1188  Return err
Caller
NameDescribe
sys_setsid