On Mon, Jul 27, 2015 at 1:31 PM, John Lane <syst...@jelmail.com> wrote:
> 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 > socat uses bidirectional streams by default, so if it says it hit EOF on "STDOUT", maybe it's treating it as alias to "STDIO" by default? Try using `socat -u` for unidirectional mode. -- Mantas Mikulėnas <graw...@gmail.com>
_______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel