shared/mainloop: Use connect() instead of bind() for sd_notify
authorGuillem Jover <guillem@hadrons.org>
Sat, 14 Dec 2019 09:40:52 +0000 (10:40 +0100)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 12 Apr 2021 09:00:47 +0000 (14:30 +0530)
commit32b3eb6bd8510126d98603cac7c97dd3bfa863a3
tree7fad3711ea8017f71124b439aa8cd355ff92e378
parent1798bf2bd0f0a7b41f4eb01ff7e82b7da9f2f646
shared/mainloop: Use connect() instead of bind() for sd_notify

We are the client, so we should be using connect(2) instead of bind(2),
otherwise when using non-abstract Unix sockets we will get an error that
the address is already in use.

This breaks the notify support in dpkg's start-stop-daemon.

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
src/shared/mainloop-notify.c