[systemd-devel] Unable to store fds with systemd and reterive it back again
Pathangi Janardhanan
path.jana at gmail.com
Wed Jan 6 09:48:17 PST 2016
Hi Daniel,
>It's only necessary to connect() sockets that are in connection mode
>(SOCK_STREAM or SOCK_SEQPACKET), but this one is a SOCK_DGRAM socket.
>The reason why this is failing is because your systemd version is too
>old. All versions prior to v227 have a bug that causes a miscalculation
>of the msg_controllen value of the message header, hence the syscall
>rightfully fails. Any chance the Ubuntu people could backport a5bd3c32?
>Martin?
>As a workaround, you basically have to options:
>a) open-code the routine as you did, but you can leave off the
connect()call, that's not needed.
Yes, it works without the connect thank you. Maybe I will try to see if I
can locally move to the latest version.
>b) Pass your own PID to sd_pid_notify_with_fds()
I had tried that before and it does not work, looks like even though my
nfds is never zero, the have_pid flag is causing the issue,
and to set that flag I have to pass a PID that is not my process PID?
Thanks
Jana
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20160106/57cda752/attachment.html>
More information about the systemd-devel
mailing list