/* does not unlink socket on errors */
static int audiod_get_socket(void)
{
- int ret, fd;
+ int ret;
if (conf.socket_given)
socket_name = para_strdup(conf.socket_arg);
S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IWOTH);
if (ret < 0)
goto err;
- fd = ret;
- if (listen(fd , 5) < 0) {
- ret = -ERRNO_TO_PARA_ERROR(errno);
- goto err;
- }
- ret = mark_fd_nonblocking(fd);
- if (ret < 0)
- goto err;
- return fd;
+ return ret;
err:
PARA_EMERG_LOG("%s\n", para_strerror(-ret));
exit(EXIT_FAILURE);