start_systemd_scope


Description:


public async bool start_systemd_scope (string name, int32 pid, string? description, DBusConnection? connection, Cancellable? cancellable) throws Error

If the current process is running inside a user systemd instance, then move the launched PID into a transient scope.

The given name will be used to create a unit name. It should be the application ID or the executable in all other cases. If a desktop-id is passed then the .desktop suffix will be stripped.

It is advisable to use this function every time where the started application can be considered reasonably independent of the launching application. Placing it in a scope creates proper separation between the programs rather than being considered a single entity by systemd.

It is always safe to call this function. Note that a successful return code does not imply that a unit has been created. It solely means that no error condition was hit sending the request.

If connection is null then g_dbus_get will be called internally.

Note that most callers will not need to handle errors. As such, it is normal to pass a null callback.

Parameters:

name

Name for the application

pid

The PID of the application

description

A description to use for the unit, or null

connection

An DBusConnection to the session bus, or null

cancellable

Cancellable to use

callback

Callback to call when the operation is done

user_data

Data to be passed to callback


Namespace: Gnome
Package: gnome-desktop-4