Re: [systemd-devel] question about socket activation

2018-01-01 Thread eshark
The program source codes and the foobar.service , the foobar.socket are as the attachments. Thanks for any suggestion! At 2017-12-29 16:19:35, "eshark" <eshar...@163.com> wrote: Hi, All I tried to test the socket activation by a simple foobar.socket and fooba

[systemd-devel] question about socket activation

2017-12-29 Thread eshark
Hi, All I tried to test the socket activation by a simple foobar.socket and foobar.service, which are as the following: foobar.socket: [Socket] ListenStream=/dev/socket/foobar [Install] WantedBy=sockets.target foobar.service: [Service]

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

2015-12-08 Thread eshark
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);                                

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

2015-12-06 Thread eshark
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);                                

[systemd-devel] wrong return value when fork() fail in exec_spawn() ?

2015-11-26 Thread eshark
Hi, all, It seems that the exec_spawn() will return 0 if fork() fails, because that return log_unit_error_errno(params->unit_id, errno, "Failed to fork: %m"); will return -r eventually. And here r = exec_context_load_environment() , which has exited successfully.

[systemd-devel] wrong return value when fork() fail in exec_spawn() ?

2015-11-25 Thread eshark
Hi, all, It seems that the exec_spawn() will return 0 if fork() fails, because that return log_unit_error_errno(params->unit_id, errno, "Failed to fork: %m"); will return -r eventually. And here r = exec_context_load_environment() , which has exited successfully.

[systemd-devel] misuse of _cleanup_free_ in bus_message_from_header() ?

2015-09-01 Thread eshark
Hi, All, I found that in bus-message.c , the bus_message_from_header() seems to misuse the _cleanup_free_ , int bus_message_from_header() { _cleanup_free_ sd_bus_message *m = NULL; ==> _cleanup_bus_message_unref_

[systemd-devel] question about sd_bus_slot_unref()

2015-08-31 Thread eshark
Hi, all     I wonder why  the sd_bus_slot_unref() always returns NULL?  I expect that I can check whether the slot->n_ref ==0 by checking its return value. That is     _public_ sd_bus_slot* sd_bus_slot_unref(sd_bus_slot *slot) { if (!slot) return NULL;

[systemd-devel] possible message leak in bus-wqueue ?

2015-08-07 Thread eshark
Hi, all If some message went into bus-wqueue, and failed to run ioctl(KDBUS_CMD_SEND) and returned r 0, I found that this message will remain in the bus-wqueue. If the peer is killed for some reason, this message will fail to be sent and remain in the wqueu for ever. Because in

Re: [systemd-devel] Can kdbus send signal to the source connection?

2015-06-20 Thread eshark
Hi, After removing /usr/lib/systemd/systemd-cgroups-agent, all seems to work OK. Thank you for your help! Best Regards, Li Cheng At 2015-06-17 18:16:06, eshark eshar...@163.com wrote: Hi, With my kdbus broadcast patch, I found that the systemd process would endlessly emit

Re: [systemd-devel] Can kdbus send signal to the source connection?

2015-06-17 Thread eshark
Hi, I'm so sorry for not giving you more details, I'm a freshman here, but I'll try to do better in the future. I will give the answers under each of the questions . At 2015-06-16 18:54:23, David Herrmann dh.herrm...@gmail.com wrote: Hi On Tue, Jun 16, 2015 at 12:07 PM, eshark eshar...@163

Re: [systemd-devel] Can kdbus send signal to the source connection?

2015-06-17 Thread eshark
-Got message type=signal sender=:1.2 destination=n/a object=/org/freedesktop/systemd1/agent interface=org.freedesktop.systemd1.Agent member=Released cookie=1 reply_cookie =0 error=n/a Thanks! Li Cheng At 2015-06-17 14:11:11, eshark eshar...@163.com wrote: Hi, I'm so sorry

Re: [systemd-devel] Can kdbus send signal to the source connection?

2015-06-16 Thread eshark
Hi, At 2015-06-15 22:32:27, Lennart Poettering lenn...@poettering.net wrote: On Mon, 15.06.15 19:05, eshark (eshar...@163.com) wrote: Hi, All, If I post this email to the wrong mail-list, please tell me, thank you. Now many JS applications implement the client and service

Re: [systemd-devel] Can kdbus send signal to the source connection?

2015-06-16 Thread eshark
Hi, At 2015-06-16 15:54:10, David Herrmann dh.herrm...@gmail.com wrote: Hi On Tue, Jun 16, 2015 at 9:35 AM, eshark eshar...@163.com wrote: Hi, At 2015-06-15 22:32:27, Lennart Poettering lenn...@poettering.net wrote: On Mon, 15.06.15 19:05, eshark (eshar...@163.com) wrote: Hi, All

[systemd-devel] Can kdbus send signal to the source connection?

2015-06-15 Thread eshark
Hi, All, If I post this email to the wrong mail-list, please tell me, thank you. Now many JS applications implement the client and service in the same thread, so they share the same connection too. However when the client or the service want to send signal to the other, the

Re: [systemd-devel] question about BUS_MATCH_ARG_PATH

2015-06-10 Thread eshark
Sorry for forgetting attach the C file. Best Regards, Li Cheng At 2015-06-10 20:35:11, eshar...@163.com wrote: Hi, All, According to the DBus protocol, http://dbus.freedesktop.org/doc/dbus-specification.html An example argument path match is arg0path='/aa/bb/'. This would