system_getsid(3f) - [M_system:QUERY] get the process group ID of a session leader (LICENSE:PD)
Synopsis
Description
Return Value
Examples
integer(kind=c_int) function system_getsid(pid)
integer(kind=c_int) :: pid
The system_getsid() function obtains the process group ID of the process that is the session leader of the process specified by pid. If pid is 0, it specifies the calling process.
Upon successful completion, system_getsid() shall return the process group ID of the session leader of the specified process. Otherwise, it shall return -1 and set errno to indicate the error.
Get SID from Fortran
program demo_system_getsid use M_system, only : system_getsid use ISO_C_BINDING, only : c_int implicit none write(*,*)SID=,system_getsid(0_c_int) end program demo_system_getsidResults:
> SID= -1
Nemo Release 3.1 | system_getsid (3m_system) | March 07, 2025 |