Table of Contents

Method getpgid

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

getpgid(int)

Retrieves the process group ID of the specified process.

public static extern int getpgid(int pid)

Parameters

pid int

The process ID of the target process. Specify 0 to retrieve the process group ID of the calling process.

Returns

int

The process group ID of the specified process, or -1 if an error occurs.

Remarks

This method is a direct wrapper for the getpgid function in the C standard library. If the specified process does not exist or the caller lacks the necessary permissions, the method will return -1.