[systemd-devel] (no subject)
Tony Seo
tonyseo7 at gmail.com
Wed Dec 18 09:58:02 PST 2013
Hello.
I tried to execute a process by using socket activation.
As it is referred at systemd manual, I made "server" and "client" process
by using "sd-daemon.h" and "sd-daemon.c".
when I made those processes, I used UDS(Unix Domain Socket) to make
communication between server and client.
(I also made "/run/test_server" which executes like "/run/foobar.sk" in
example of systemd manual for socket activation)
http://0pointer.de/blog/projects/socket-activation.html
And then, In order to make the process started, I made test_server.socket
and test_server.service.
those thing have contents like below:
--------------------test_server.socket---------------------------
[Socket]
ListenStream=/run/test_server
[Install]
WantedBy=sockets.target
----------------------------------------------------------------------------
--------------------test_server.service---------------------------
[Service]
Type=oneshot
ExecStart=/bin/sh /usr/bin/kill-avn-process.sh
StandardOutput=journal+console
TTYPath=/dev/ttyTCC0
[Install]
WantedBy=multi-user.target
----------------------------------------------------------------------------
As soon as I executed the client process, test_server.service worked
rapidly but it seemed to run in infinite loop with changing it's PID and
then, it showed that error messages like:
systemd[1]: test_server.service start request repeated too quickly,
refusing to start.
systemd[1]: Failed to start test_server.service.
I already knew that a process executed by socket activation would be
respawn.
But, what the important thing is that I don't know how to control the
number of respawn.
And, why does systemd make the error about request timing.
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20131219/178cbb4b/attachment.html>
More information about the systemd-devel
mailing list