Mercurial > dovecot > original-hg > dovecot-1.2
changeset 9632:84a1deb21c2e HEAD
master: Delete also pipes from login_dir (left by v2.0)
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 26 Nov 2010 18:51:47 +0000 |
parents | cda53154e222 |
children | c447114b0f89 |
files | src/master/master-settings.c |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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? "