setsid.2
来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 2 代码 · 共 52 行
2
52 行
.\" SCCSID: @(#)setsid.2 2.3 8/10/87.TH setsid 2.SH Namesetsid \- POSIX create session and set process group ID.SH Syntax.ft B.nf#include <sys/types.h>pid_tsetsid().fi.ft R.SH Description.NXR "setsid system call".NXR "session" "creating"The.PN setsidsystem callcreates a new session, if the calling process is not a process group leader.The calling process is the session leader of the new session, the process group leader of the new process group, and does not have a controlling terminal.The process group ID of the calling process is set equal to the process ID of the calling process..SH Return ValuesUpon successful completion, the.PN setsidsystem callreturns the value of the process group ID of the calling process.If the .PN setsidsystem call fails, \-1 is returned, and the globalvariable.I errnoindicates the reason..SH DiagnosticsThe.PN setsidsystem callfails and a new session is not created ifthe following occurs:.TP 15[EPERM]The calling process is already a process group leader..spThe process group ID of a process other than the calling processmatches the process ID of the calling process..SH See Alsogetpgrp(2), setpgid(3)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?