[dovecot-cvs] dovecot/src/master mail-process.c,1.93,1.94
cras at dovecot.org
cras at dovecot.org
Fri Apr 21 18:14:46 EEST 2006
Update of /var/lib/cvs/dovecot/src/master
In directory talvi:/tmp/cvs-serv9433
Modified Files:
mail-process.c
Log Message:
NFS check should be done only once at startup, not every time.
Index: mail-process.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/master/mail-process.c,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -d -r1.93 -r1.94
--- mail-process.c 21 Apr 2006 11:23:01 -0000 1.93
+++ mail-process.c 21 Apr 2006 15:14:44 -0000 1.94
@@ -393,7 +393,7 @@
array_t ARRAY_DEFINE(extra_args, const char *);
unsigned int i, count;
int err, ret, log_fd, nice;
- bool home_given;
+ bool home_given, nfs_check;
// FIXME: per-group
if (mail_process_count == set->max_mail_processes) {
@@ -459,6 +459,15 @@
fd_close_on_exec(log_fd, TRUE);
}
+ /* See if we need to do the initial NFS check. We want to do this only
+ once, so the check code needs to be before fork(). */
+ if (set->nfs_check && !set->mmap_disable && !dump_capability) {
+ set->nfs_check = FALSE;
+ nfs_check = TRUE;
+ } else {
+ nfs_check = FALSE;
+ }
+
pid = fork();
if (pid < 0) {
i_error("fork() failed: %m");
@@ -564,7 +573,7 @@
mail_process_set_environment(set, mail, var_expand_table);
- /* add extra args. uppercase key value. */
+ extra args. uppercase key value. */
args = array_get(&extra_args, &count);
for (i = 0; i < count; i++) {
if (*args[i] == '=') {
@@ -584,11 +593,8 @@
}
}
- if (set->nfs_check && !set->mmap_disable && !dump_capability) {
- /* do this only once */
+ if (nfs_check)
nfs_warn_if_found(getenv("MAIL"), home_dir);
- set->nfs_check = FALSE;
- }
env_put("LOGGED_IN=1");
env_put(t_strconcat("HOME=", home_dir, NULL));
More information about the dovecot-cvs
mailing list