From: Daan De Meyer Date: Mon, 20 Apr 2020 17:57:25 +0000 (+0200) Subject: sd-bus: Rewrap sd_bus_set_close_on_exit + small fixes X-Git-Tag: v246-rc1~552^2 X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fsystemd.git;a=commitdiff_plain;h=23139f89dc0ab115fb1e423f0d64c5a5f04eee41 sd-bus: Rewrap sd_bus_set_close_on_exit + small fixes --- diff --git a/man/sd_bus_set_close_on_exit.xml b/man/sd_bus_set_close_on_exit.xml index 751fc0a729e..64ca3564439 100644 --- a/man/sd_bus_set_close_on_exit.xml +++ b/man/sd_bus_set_close_on_exit.xml @@ -20,7 +20,8 @@ sd_bus_set_close_on_exit sd_bus_get_close_on_exit - Control whether to close the bus connection during the event loop exit phase + Control whether to close the bus connection during the event loop exit phase + @@ -44,30 +45,35 @@ Description - sd_bus_set_close_on_exit() may be used to enable or disable whether the bus connection - is automatically flushed (as in - sd_bus_flush3) and closed (as in - sd_bus_close3) during the exit - phase of the event loop. This logic only applies to bus connections that are attached to an - sd-event3 event loop, see - sd_bus_attach_event3. By default - this mechanism is enabled and makes sure that any pending messages that have not been written to the bus connection - are written out when the event loop is shutting down. In some cases this behaviour is not desirable, for example - when the bus connection shall remain usable until after the event loop exited. If b is - true, the feature is enabled (which is the default), otherwise disabled. - - sd_bus_get_close_on_exit() may be used to query the current setting of this feature. It - returns zero when the feature is disabled, and positive if enabled. + sd_bus_set_close_on_exit() may be used to enable or disable whether + the bus connection is automatically flushed (as in + sd_bus_flush3) + and closed (as in + sd_bus_close3) + during the exit phase of the event loop. This logic only applies to bus connections that are + attached to an + sd-event3 + event loop, see + sd_bus_attach_event3. + By default this mechanism is enabled and makes sure that any pending messages that have not been + written to the bus connection are written out when the event loop is shutting down. In some + cases this behaviour is not desirable, for example when the bus connection shall remain usable + until after the event loop exited. If b is true, the feature is enabled + (which is the default), otherwise disabled. + + sd_bus_get_close_on_exit() may be used to query the current setting + of this feature. It returns zero when the feature is disabled, and positive if enabled. Return Value - On success, sd_bus_set_close_on_exit() returns 0 or a positive integer. On failure, it returns a negative errno-style - error code. + On success, sd_bus_set_close_on_exit() returns a non-negative + integer. On failure, it returns a negative errno-style error code. - sd_bus_get_close_on_exit() returns 0 if the feature is currently turned off or a - positive integer if it is on. On failure, it returns a negative errno-style error code. + sd_bus_get_close_on_exit() returns 0 if the feature is currently + disabled or a positive integer if it is enabled. On failure, it returns a negative errno-style + error code. Errors @@ -78,7 +84,8 @@ -ECHILD - The bus connection has been created in a different process. + The bus connection was created in a different process. + @@ -98,5 +105,4 @@ sd_event_add_exit3 - diff --git a/man/sd_bus_set_exit_on_disconnect.xml b/man/sd_bus_set_exit_on_disconnect.xml index 97e0e03fcf2..8bd904ba407 100644 --- a/man/sd_bus_set_exit_on_disconnect.xml +++ b/man/sd_bus_set_exit_on_disconnect.xml @@ -65,11 +65,11 @@ Return Value - On success, sd_bus_set_close_on_exit() returns a non-negative + On success, sd_bus_set_exit_on_disconnect() returns a non-negative integer. On failure, it returns a negative errno-style error code. - sd_bus_get_close_on_exit() returns a positive integer if the exit on - disconnect behavior is enabled. Otherwise, it returns zero. + sd_bus_get_exit_on_disconnect() returns a positive integer if the + exit on disconnect behavior is enabled. Otherwise, it returns zero. Errors @@ -77,6 +77,18 @@ Returned errors may indicate the following problems: + + -EINVAL + + A required parameter was NULL. + + + + -ENOPKG + + The bus object could not be resolved. + + -ECHILD