doveadm-master.c revision de41dbb482990a4be10ca9033cf881a850ccdc50
7cb14f34a92e0a8eae07db027344126bf5c901c9KATOH Yasufumi/* Copyright (c) 2010-2016 Dovecot authors, see the included COPYING file */
c13c0e08da7dbfecb52e85233ac6cd17afa5d818Stéphane Graberstatic bool pid_file_read(const char *path, pid_t *pid_r)
d1de19abd0067f38bc08a4a3357de701a4e5571ddlezcano if (ret <= 0) {
6a85cf91247b7dd9c3faeddceca8dacb96d02cd6Stéphane Graber unsigned int i;
d0a6bd39400a6d14cfec94ad647f3af1bda1e321Christian Brauner pidfile_path = t_strconcat(doveadm_settings->base_dir,
6a85cf91247b7dd9c3faeddceca8dacb96d02cd6Stéphane Graber i_fatal("Dovecot is not running (read from %s)", pidfile_path);
7822022c4c72cee06905b540b89b653491d6f6b2Stéphane Graber i_fatal("kill(%s, %d) failed: %m", dec2str(pid), signo);
aa8d013ec5b09cd1cd904173d6234ef126eb2126Peter Simons /* wait for a while for the process to die */
6a85cf91247b7dd9c3faeddceca8dacb96d02cd6Stéphane Graber for (i = 0; i < 30; i++) {
const char *path;
const char *str =
alarm(0);