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, and here is the snippet of code that is being called to store the FDS. I have also included the debug code.
// 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); From the debug printf I see 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 -22 The 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. Thanks Jana
_______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel