/* Copyright (c) 2005-2018 Dovecot authors, see the included COPYING file */
#include "common.h"
#include "array.h"
#include "aqueue.h"
#include "hash.h"
#include "ioloop.h"
#include "service.h"
#include "service-process.h"
#include "service-process-notify.h"
#include "service-anvil.h"
#include "service-log.h"
#include <unistd.h>
{
i_error("pipe() failed: %m");
return -1;
}
if (ret < 0) {
i_error("write(log handshake) failed: %m");
return -1;
}
i_error("write(log handshake) didn't write everything");
return -1;
}
return 0;
}
static int
{
const char *data;
/* another log process was just destroyed */
return 0;
}
i_error("write(log process) failed: %m");
return -1;
}
return 0;
}
{
const char *log_prefix;
int fd;
handshake_buf) < 0)
ret = -1;
else
continue;
handshake_buf) < 0) {
ret = -1;
break;
}
}
if (ret < 0) {
return -1;
}
return 0;
}
{
unsigned int i, count;
for (i = 0; i < count; i++) {
"close(log_fd) failed: %m");
}
"close(log_fd) failed: %m");
}
}
}
i_error("close(master log fd) failed: %m");
i_error("close(master log fd) failed: %m");
}
}
struct service_list *service_list,
{
unsigned int n = 0;
/* master log fd is always the first one */
n++; *fd_count += 1;
continue;
n++; *fd_count += 1;
}
}