unlink(socket_name);
ret = create_local_socket(socket_name, &unix_addr,
S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IWOTH);
- if (ret < 0)
+ if (ret < 0) {
+ PARA_EMERG_LOG("%s: %s\n", PARA_STRERROR(-ret), socket_name);
exit(EXIT_FAILURE);
+ }
if (listen(ret , 5) < 0) {
PARA_EMERG_LOG("%s", "can not listen on socket\n");
exit(EXIT_FAILURE);
goto out;
}
if (t->ret != sizeof(buf)) {
- PARA_NOTICE_LOG("short read (%d bytes, expected %u)\n",
- t->ret, sizeof(buf));
+ PARA_NOTICE_LOG("short read (%d bytes, expected %lu)\n",
+ t->ret, (long unsigned) sizeof(buf));
t->ret = 1;
goto out;
}