Hello-
tl;dr Go's Sendmsg always sends a "dummy byte" even when you are only
sending OOB data. This breaks a protocol I want to talk to:
systemd-journal. See attached patch for a "fix".
While working on go-systemd[1] David found that Go syscall.Sendmsg was
always sending one byte of data when we only wanted to send out of
band data (a file descriptor). The attached patch "fixes" the problem
for us but also breaks the tests.
This is the line of code in systemd-journal that rejects messages with
the dummy byte:
https://github.com/systemd/systemd/blob/master/src/journal/journald-server.c#L1238
Instead of fixing everything up I wanted to understand _why_ this
dummy byte is being sent first. The code seems to have been there
since the initial commit of the syscall_linux.go.
So, why was does this dummy byte exist? Are there other platforms that
require this byte?
If I fixup all of the tests and the poller is this patch mergeable?
Thank You,
Brandon
[1]
https://github.com/coreos/go-systemd/blob/master/journal/send.go#L83