[UP]


Manual Reference Pages  - system_setsid (3)

NAME

system_setsid(3f) - [M_system:QUERY] create session and set the process group ID of a session leader (LICENSE:PD)

CONTENTS

Synopsis
Description
Return Value
Errors
Example

SYNOPSIS

integer(kind=c_int) function system_setsid(pid) integer(kind=c_int) :: pid

DESCRIPTION

The setsid() function creates a new session, if the calling process is not a process group leader. Upon return the calling process shall be the session leader of this new session, shall be the process group leader of a new process group, and shall have no controlling terminal. The process group ID of the calling process shall be set equal to the process ID of the calling process. The calling process shall be the only process in the new process group and the only process in the new session.

RETURN VALUE

Upon successful completion, setsid() shall return the value of the new process group ID of the calling process. Otherwise,

ERRORS

The setsid() function shall fail if:
o The calling process is already a process group leader
o the process group ID of a process other than the calling process matches the process ID of the calling process.

EXAMPLE

Set SID from Fortran

   program demo_system_setsid
   use M_system,      only : system_setsid
   implicit none
      write(*,*)’SID=’,system_setsid()
   end program demo_system_setsid


system_setsid (3) March 11, 2021
Generated by manServer 1.08 from d94930d9-bfdc-4918-8e9d-ff5516ec724c using man macros.

Binary file (standard input) matches