sd_varlink_server_new - Man Page

Allocate Varlink server object

Synopsis

#include <systemd/sd-varlink.h>

int sd_varlink_server_new(sd_varlink_server** ret, sd_varlink_server_flags_t flags);

Description

sd_varlink_server_new() allocates a new Varlink server object. Initially the server does not listen on any socket or file descriptor. The newly allocated server object is returned in the ret parameter. Use sd_varlink_server_unref() to release the server object again after use.

The following flags may be passed in the flags parameter:

Return Value

On success, sd_varlink_server_new() returns a non-negative integer. On failure, it returns a negative errno-style error code.

Errors

Returned errors may indicate the following problems:

-EINVAL

An argument is invalid.

Notes

Functions described here are available as a shared library, which can be compiled against and linked to with the libsystemd pkg-config(1) file.

The code described here uses getenv(3), which is declared to be not multi-thread-safe. This means that the code calling the functions described here must not call setenv(3) from a parallel thread. It is recommended to only do calls to setenv() from an early phase of the program when no other threads have been started.

History

sd_varlink_server_new() was added in version 257.

See Also

systemd(1), sd-varlink(3)

Referenced By

systemd.directives(7), systemd.index(7).

systemd 259~rc3