05.01.2016, 09:11, "Pathangi Janardhanan" <path.j...@gmail.com>:
,From the debug printf I seeand here is the snippet of code that is being called to store the FDS. I have also included the debug code.Hi,I am using the function sd_pid_notify_with_fds and am unable to store the fds with systemd. My service is a simple echo server,
// Store the FDs with systemd
e = getenv("NOTIFY_SOCKET");
if (e == NULL) {
syslog(LOG_NOTICE, "environment variable Notify socket is null");
} else {
syslog(LOG_NOTICE, "env. variable Notify Socket =%s %d", e,
strlen(e));
}
syslog(LOG_NOTICE, "Storing %d number of fds", num_fd);
ret = sd_pid_notify_with_fds(0, 0, "FDSTORE=1\n", (const int *) fd,
num_fd);
syslog(LOG_NOTICE, "Result of sd notify %d", ret);
Jan 5 00:37:23 ctoserver11 /usr/bin/myechoser[13640]: env. variable Notify Socket =/run/systemd/notify 19
Jan 5 00:37:23 ctoserver11 /usr/bin/myechoser[13640]: Storing 1 number of fds
Jan 5 00:37:23 ctoserver11 /usr/bin/myechoser[13640]: Result of sd notify -22The return value seems to be -EINVAL, but looking at the code and the above debug, I am not sure why this is happening?Any help would be great.ThanksJana_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Which version of systemd are you using?
That bug affects `systemtctl restart systemd-journald`.
See https://github.com/systemd/systemd/issues/2236#issuecomment-167739937
--
Best regards,
Best regards,
Evgeny Vereshchagin
_______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel