![]() |
![]() |
![]() |
PolicyKit Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
PolkitUnixProcess; PolkitSubject * polkit_unix_process_new (pid_t pid); PolkitSubject * polkit_unix_process_new_full (pid_t pid, guint64 start_time); pid_t polkit_unix_process_get_pid (PolkitUnixProcess *process); guint64 polkit_unix_process_get_start_time (PolkitUnixProcess *process); void polkit_unix_process_set_pid (PolkitUnixProcess *process, pid_t pid);
An object for representing a UNIX process.
To uniquely identify processes, both the process id and the start time of the process (a monotonic increasing value representing the time since the kernel was started) is used.
typedef struct _PolkitUnixProcess PolkitUnixProcess;
The PolkitUnixProcess struct should not be accessed directly.
PolkitSubject * polkit_unix_process_new (pid_t pid);
Creates a new PolkitUnixProcess for pid
. The start time of the
process will be looked up in using e.g. the
/proc
filesystem depending on the platform in
use.
|
The process id. |
Returns : |
A PolkitSubject. Free with g_object_unref() .
|
PolkitSubject * polkit_unix_process_new_full (pid_t pid, guint64 start_time);
Creates a new PolkitUnixProcess object for pid
and start_time
.
|
The process id. |
|
The start time for pid .
|
Returns : |
A PolkitSubject. Free with g_object_unref() .
|
pid_t polkit_unix_process_get_pid (PolkitUnixProcess *process);
Gets the process id for process
.
|
A PolkitUnixProcess. |
Returns : |
The process id for process .
|
guint64 polkit_unix_process_get_start_time (PolkitUnixProcess *process);
Gets the start time of process
.
|
A PolkitUnixProcess. |
Returns : |
The start time of process .
|
void polkit_unix_process_set_pid (PolkitUnixProcess *process, pid_t pid);
Sets pid
for process
.
|
A PolkitUnixProcess. |
|
A process id. |