dovecot-1.2: master: Delete also pipes from login_dir (left by v...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Nov 26 20:51:49 EET 2010
details: http://hg.dovecot.org/dovecot-1.2/rev/84a1deb21c2e
changeset: 9632:84a1deb21c2e
user: Timo Sirainen <tss at iki.fi>
date: Fri Nov 26 18:51:47 2010 +0000
description:
master: Delete also pipes from login_dir (left by v2.0)
diffstat:
src/master/master-settings.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (22 lines):
diff -r cda53154e222 -r 84a1deb21c2e src/master/master-settings.c
--- a/src/master/master-settings.c Mon Nov 08 19:43:41 2010 +0000
+++ b/src/master/master-settings.c Fri Nov 26 18:51:47 2010 +0000
@@ -633,7 +633,8 @@
i_error("lstat(%s) failed: %m", str_c(str));
continue;
}
- if (!S_ISSOCK(st.st_mode))
+ /* delete also FIFOs created by v2.0 */
+ if (!S_ISSOCK(st.st_mode) && !S_ISFIFO(st.st_mode))
continue;
/* try to avoid unlinking sockets if someone's already
@@ -641,7 +642,7 @@
when SIGHUPing a child process might catch the new
connection before it notices that it's supposed
to die. null_fd == -1 check is a bit kludgy, but works.. */
- if (null_fd == -1) {
+ if (null_fd == -1 && S_ISSOCK(st.st_mode)) {
int fd = net_connect_unix(str_c(str));
if (fd != -1 || errno != ECONNREFUSED) {
i_fatal("Dovecot is already running? "
More information about the dovecot-cvs
mailing list