service-anvil.c revision c6260b961ca7b469a75ab842eeb53d3f904090e3
/* Copyright (c) 2009 Dovecot authors, see the included COPYING file */
#include "common.h"
#include "fd-close-on-exec.h"
#include "fd-set-nonblock.h"
#include "service.h"
#include "service-process.h"
#include "service-process-notify.h"
#include "service-anvil.h"
#include <unistd.h>
#define ANVIL_HANDSHAKE "VERSION\tanvil\t1\t0\n"
{
if (ret < 0) {
return -1;
}
if (ret == 0) {
return -1;
}
/* this is a pipe, it either wrote all of it or nothing */
return 0;
}
static int
{
const char *data;
i_error("write(anvil process) failed: %m");
return -1;
}
return 0;
}
const char **error_r)
{
return -1;
}
return -1;
}
error_r) < 0)
return -1;
error_r) < 0)
return -1;
return 0;
}
{
i_error("close(anvil) failed: %m");
i_error("close(anvil) failed: %m");
i_error("close(anvil) failed: %m");
i_error("close(anvil) failed: %m");
}