the change introduced by commit
31c53c2e1afc6c81ce4aad5ef4cb982cd2fea365
do not allow anymore to have more than one monitor.
The purpose of this patch is to add an error message
when such a condition is identified, eg:
===
lxc-monitor: bind : Address already in use
===
Signed-off-by: Michel Normand <normand@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
strcpy(offset, "lxc-monitor");
fd = socket(PF_UNIX, SOCK_DGRAM, 0);
- if (fd < 0)
+ if (fd < 0) {
+ ERROR("socket : %s", strerror(errno));
return -1;
+ }
if (bind(fd, (struct sockaddr *)&addr, sizeof(addr))) {
+ ERROR("bind : %s", strerror(errno));
close(fd);
return -1;
}