[systemd-devel] question about the conditions for bus_enter_closing()

eshark eshark77 at 163.com
Tue Dec 8 18:40:36 PST 2015


Hi, All


         In the sd-bus.c, there are four conditions for calling the bus_enter_closing, as is: 

                        if (r == -ENOTCONN || r == -ECONNRESET || r == -EPIPE || r == -ESHUTDOWN) {
                                   bus_enter_closing(bus);
                                   return -ECONNRESET;
                           }
   
         While working with kdbus in the kernel, the kdbus return -EPIPE  to the remote connection while the local connection dies, and sometimes the kdbus
also return -ECONNRESET when the local connection dies. 
  
         Thus, it seems unreasonable for the remote connection to enter BUS_CLOSING state when it gets -EPIPE or sometimes -ECONNRESET.


         If you agree with the above issues,  which is the better choice, to modify the conditions in the sd-bus.c , or to modify the errno in the kdbus kernel?

        Because the kdbus kernel always return -EPIPE to the remote connection , so it is reasonable to remove the EPIPE from the sd-bus.c ?
  And becasue the kdbus kernel sometimes returen -ECONNRESET to the remote connection when the local connection dies, so it is reasonable to give a new errno for this case? such as EPERM or EHOSTUNREACH..


B.R.
Li Cheng


   


More information about the systemd-devel mailing list