I have a problem with what I thought would be a simple service unit:

    # /etc/systemd/system/socat.service
    [Service]
    ExecStart=/usr/bin/socat UDP-RECV:4321 STDOUT

The expected outcome is that "/usr/bin/socat UDP-RECV:4321 STDOUT" is
started with its standard output connected to the journal.

However, the service terminates immediately without error. I've looked
into it and notice that socat is getting an EOF on FD#1, its standard
output, and it then terminates:

    N starting data transfer loop with FDs [5,5] and [1,1]
    N socket 2 (fd 1) is at EOF
    I close(5)
    N exiting with status 0

The command-line given in "ExecStart" works as expected if given on a
command-line.

I have tried adding an explicit "StandardOutput=journal" to the above
but it made no difference.

I expect I have got something wrong with my unit but I don't know what.
Any pointers appreciated.

Thanks.
J

_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to