[systemd-devel] How to implement a demon process by socket activation

2013-09-11 Thread Tony Seo
Hi
I have been aiming to make a demon process by socket activation in systemd.
you know that,  it was provided for socket activation in systemd homepage
like below .
http://0pointer.de/blog/projects/socket-activation.html

I refered that guide for making a daemon process started using socket
activation.

I just followed the explanation in that site and tried to make a pair of
server/client program on TCP/IP.( I just only added a sd_listen_fds()
library fuction in server process using sd-daemon library)

But it didn't work when I started server process.

those processes  include  almost same code with following the guide.

Is that all to make a daemon process by socket activation in homepage?



Thanks, tonyseo
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] How to implement a demon process by socket activation

2013-09-11 Thread Lennart Poettering
On Wed, 11.09.13 21:33, Tony Seo (tonys...@gmail.com) wrote:

 Hi
 I have been aiming to make a demon process by socket activation in systemd.
 you know that,  it was provided for socket activation in systemd homepage
 like below .
 http://0pointer.de/blog/projects/socket-activation.html
 
 I refered that guide for making a daemon process started using socket
 activation.
 
 I just followed the explanation in that site and tried to make a pair of
 server/client program on TCP/IP.( I just only added a sd_listen_fds()
 library fuction in server process using sd-daemon library)
 
 But it didn't work when I started server process.
 
 those processes  include  almost same code with following the guide.
 
 Is that all to make a daemon process by socket activation in homepage?

Yes, usually it is. Note however that some daemons close all open fds
during initialization. You need to exclude the socket actviation fds
from that.

It might be useful to play around with the new systemd-activate tool in
order to debug this. See man 8 systemd-activate.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel