[Issue#] Return value not handled.
[Bug] N/A
[Cause] N/A
[Solution] Log error on chmod fail.
[Verification] Build commons.
Change-Id: I7196aa7da0307993a49812e29a6ff6a7189c8b86
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
+#include <string.h>
namespace DPL
{
GenericSocket<UnixSocket>::Bind(address);
// Always set proper permissions to the socket file
- chmod(address.GetAddress().c_str(), 0777);
+ if(chmod(address.GetAddress().c_str(), 0777)<0){
+ LogError("Error setting permissions to the socket file. Errno " << strerror(errno));
+ }
}
-
}
} // namespace DPL