<div dir="ltr">Hi Daniel,<br><div class="gmail_extra"><div class="gmail_quote"><div> <span></span>>It's only necessary to connect() sockets that are in connection mode<br>>(SOCK_STREAM or SOCK_SEQPACKET), but this one is a SOCK_DGRAM socket.<br><br>>The reason why this is failing is because your systemd version is too<br>>old. All versions prior to v227 have a bug that causes a miscalculation<br>>of the msg_controllen value of the message header, hence the syscall<br>>rightfully fails. Any chance the Ubuntu people could backport a5bd3c32?<br>>Martin?<br></div><div><br></div><div>>As a workaround, you basically have to options:<br>>a) open-code the routine as you did, but you can leave off the connect()call, that's not needed.<br><br>  Yes, it works without the connect thank you. Maybe I will try to see if I can locally move to the latest version.<br><br>>b) Pass your own PID to sd_pid_notify_with_fds()<br><br></div><div> 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, <br></div><div>and to set that flag I have to pass a PID that is not my process PID? <br><br></div><div>Thanks<br></div><div>Jana<br></div></div><br></div></div>