UnixSession.for_process_sync


Description:

[ CCode ( has_construct_function = false , type = "PolkitSubject*" ) ]
public UnixSession.for_process_sync (int pid, Cancellable? cancellable = null) throws Error

Creates a new UnixSession for the process with process id pid.

This is a synchronous call - the calling thread is blocked until a reply is received. For the asynchronous version, see UnixSession.for_process.

Parameters:

pid

The process id of the process to get the session for.

cancellable

A Cancellable or null.

Returns:

A UnixSession for pid or null if throws is set. Free with unref .