polkit Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
PolkitUnixProcess; PolkitSubject * polkit_unix_process_new (gint pid
); PolkitSubject * polkit_unix_process_new_full (gint pid
,guint64 start_time
); PolkitSubject * polkit_unix_process_new_for_owner (gint pid
,guint64 start_time
,gint uid
); void polkit_unix_process_set_pid (PolkitUnixProcess *process
,gint pid
); gint polkit_unix_process_get_pid (PolkitUnixProcess *process
); void polkit_unix_process_set_start_time (PolkitUnixProcess *process
,guint64 start_time
); guint64 polkit_unix_process_get_start_time (PolkitUnixProcess *process
); void polkit_unix_process_set_uid (PolkitUnixProcess *process
,gint uid
); gint polkit_unix_process_get_uid (PolkitUnixProcess *process
);
"pid" gint : Read / Write / Construct "start-time" guint64 : Read / Write / Construct "uid" gint : Read / Write / Construct
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 (gint pid
);
Creates a new PolkitUnixProcess for pid
.
The uid and 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() . [transfer full]
|
PolkitSubject * polkit_unix_process_new_full (gint pid
,guint64 start_time
);
Creates a new PolkitUnixProcess object for pid
and start_time
.
The uid of the process will be looked up in using e.g. the
/proc
filesystem depending on the platform in
use.
|
The process id. |
|
The start time for pid . |
Returns : |
A PolkitSubject. Free with g_object_unref() . [transfer full]
|
PolkitSubject * polkit_unix_process_new_for_owner (gint pid
,guint64 start_time
,gint uid
);
Creates a new PolkitUnixProcess object for pid
, start_time
and uid
.
|
The process id. |
|
The start time for pid or 0 to look it up in e.g. /proc . |
|
The (real, not effective) uid of the owner of pid or -1 to look it up in e.g. /proc . |
Returns : |
A PolkitSubject. Free with g_object_unref() . [transfer full]
|
void polkit_unix_process_set_pid (PolkitUnixProcess *process
,gint pid
);
Sets pid
for process
.
|
A PolkitUnixProcess. |
|
A process id. |
gint polkit_unix_process_get_pid (PolkitUnixProcess *process
);
Gets the process id for process
.
|
A PolkitUnixProcess. |
Returns : |
The process id for process . |
void polkit_unix_process_set_start_time (PolkitUnixProcess *process
,guint64 start_time
);
Set the start time of process
.
|
A PolkitUnixProcess. |
|
The start time for pid . |
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_uid (PolkitUnixProcess *process
,gint uid
);
Sets the (real, not effective) user id for process
.
|
A PolkitUnixProcess. |
|
The user id to set for process or -1 to unset it. |
gint polkit_unix_process_get_uid (PolkitUnixProcess *process
);
Gets the user id for process
. Note that this is the real user-id,
not the effective user-id.
|
A PolkitUnixProcess. |
Returns : |
The user id for process or -1 if unknown. |
"pid"
property"pid" gint : Read / Write / Construct
The UNIX process id.
Allowed values: >= 0
Default value: 0
"start-time"
property"start-time" guint64 : Read / Write / Construct
The start time of the process.
Default value: 0
"uid"
property"uid" gint : Read / Write / Construct
The UNIX user id of the process or -1 if unknown.
Note that this is the real user-id, not the effective user-id.
Allowed values: >= G_MAXULONG
Default value: -1