'\" t .TH "SD_BUS_PROCESS" "3" "" "elogind 239.3" "sd_bus_process" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" sd_bus_process \- Drive the connection .SH "SYNOPSIS" .sp .ft B .nf #include .fi .ft .HP \w'int\ sd_bus_process('u .BI "int sd_bus_process(sd_bus\ *" "bus" ", sd_bus_message\ **" "r" ");" .SH "DESCRIPTION" .PP \fBsd_bus_process()\fR drives the connection between the message bus and the client\&. That is, it handles connecting, authentication, and message processing\&. It should be called in a loop until no further progress can be made or an error occurs\&. .PP Once no further progress can be made, \fBsd_bus_wait\fR(3) should be called\&. Alternatively the user can wait for incoming data on the file descriptor returned by \fBsd_bus_get_fd\fR(3)\&. .PP \fBsd_bus_process\fR processes at most one incoming message per call\&. If the parameter \fIr\fR is not NULL and the call processed a message, *r is set to this message\&. The caller owns a reference to this message and should call \fBsd_bus_message_unref\fR(3) when the message is no longer needed\&. If \fIr\fR is not NULL, progress was made, but no message was processed, *r is set to NULL\&. .SH "RETURN VALUE" .PP If progress was made, a positive integer is returned\&. If no progress was made, 0 is returned\&. If an error occurs, a negative errno\-style error code is returned\&. .SH "SEE ALSO" .PP \fBelogind\fR(8), \fBsd-bus\fR(3),