Manual Reference Pages  - system_getsid (3m_system)

NAME

system_getsid(3f) - [M_system:QUERY] get the process group ID of a session leader (LICENSE:PD)

CONTENTS

Synopsis
Description
Return Value
Examples

SYNOPSIS

integer(kind=c_int) function system_getsid(pid)

     integer(kind=c_int) :: pid

DESCRIPTION

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.

RETURN VALUE

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.

EXAMPLES

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_getsid

Results:

 >  SID=          -1


Nemo Release 3.1 system_getsid (3m_system) March 07, 2025
Generated by manServer 1.08 from 009fe645-960f-4930-bc17-bbdeab186cb5 using man macros.