<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Jul 27, 2015 at 1:31 PM, John Lane <span dir="ltr"><<a href="mailto:systemd@jelmail.com" target="_blank">systemd@jelmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I have a problem with what I thought would be a simple service unit:<br>
<br>
# /etc/systemd/system/socat.service<br>
[Service]<br>
ExecStart=/usr/bin/socat UDP-RECV:4321 STDOUT<br>
<br>
The expected outcome is that "/usr/bin/socat UDP-RECV:4321 STDOUT" is<br>
started with its standard output connected to the journal.<br>
<br>
However, the service terminates immediately without error. I've looked<br>
into it and notice that socat is getting an EOF on FD#1, its standard<br>
output, and it then terminates:<br>
<br>
N starting data transfer loop with FDs [5,5] and [1,1]<br>
N socket 2 (fd 1) is at EOF<br>
I close(5)<br>
N exiting with status 0<br></blockquote><div><br></div><div>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?</div><div><br></div><div>Try using `socat -u` for unidirectional mode.</div></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Mantas Mikulėnas <<a href="mailto:grawity@gmail.com" target="_blank">grawity@gmail.com</a>></div></div>
</div></div>