Hi,
On 01/06/2016 12:07 AM, Pathangi Janardhanan wrote:
> Hi All,
>
> After trying a few things out, here are couple doubts that I have.
>
> 1. I am able to get this to work, if I modify the way the sendmsg is
> being done, here is a temp. function that I wrote in my own service
> to mimic the
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
Hi,
>> ret = sd_pid_notify_with_fds(0, 0, "FDSTORE=1\n", (const int *) fd,
>>num_fd);
> Is "fd" a single fd? If so you need to pass this as of course...
No, fd is a int array, which holds num_fd, "fd" values.
>The FDSTORE=1 line doesn't need to be suffixed with
Hi,
>> This is the output of the strace call on this section of the code in
>> the sd_pid_notify_with_fds, when I try to save the fds.
>>
>> socket(PF_LOCAL, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 8
>>
>> sendmsg(8, {msg_name(21)={sa_family=AF_LOCAL,
>> sun_path="/run/systemd/notify"},
On 01/05/2016 06:33 PM, Pathangi Janardhanan wrote:
> This is the output of the strace call on this section of the code in
> the sd_pid_notify_with_fds, when I try to save the fds.
>
> socket(PF_LOCAL, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 8
>
> sendmsg(8, {msg_name(21)={sa_family=AF_LOCAL,
>
On Tue, 05.01.16 01:11, Pathangi Janardhanan (path.j...@gmail.com) wrote:
> 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
Hi All,
After trying a few things out, here are couple doubts that I have.
1. I am able to get this to work, if I modify the way the sendmsg is being
done, here is a temp. function that I wrote in my own service
to mimic the actions of sd_pid_notify_with_pids and with this I am able to
store
05.01.2016, 09:11, "Pathangi Janardhanan" :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
On Tue, Jan 05, 2016 at 01:11:16AM -0500, Pathangi Janardhanan wrote:
> 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