dovecot-2.0: master: If execv() fails with ENOMEM, mention the v...

dovecot at dovecot.org dovecot at dovecot.org
Mon Aug 24 20:15:39 EEST 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/aad3157d52a1
changeset: 9808:aad3157d52a1
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Aug 24 13:15:34 2009 -0400
description:
master: If execv() fails with ENOMEM, mention the vsz_limit setting.

diffstat:

1 file changed, 3 insertions(+), 2 deletions(-)
src/master/main.c |    5 +++--

diffs (15 lines):

diff -r 41188b7db88a -r aad3157d52a1 src/master/main.c
--- a/src/master/main.c	Mon Aug 24 11:38:56 2009 -0400
+++ b/src/master/main.c	Mon Aug 24 13:15:34 2009 -0400
@@ -77,8 +77,9 @@ void process_exec(const char *cmd, const
 	/* prefix with dovecot/ */
 	argv[0] = t_strconcat(PACKAGE"/", argv[0], NULL);
 
-	execv(executable, (char **)argv);
-	i_fatal_status(FATAL_EXEC, "execv(%s) failed: %m", executable);
+	(void)execv(executable, (char **)argv);
+	i_fatal_status(errno == ENOMEM ? FATAL_OUTOFMEM : FATAL_EXEC,
+		       "execv(%s) failed: %m", executable);
 }
 
 int get_uidgid(const char *user, uid_t *uid_r, gid_t *gid_r,


More information about the dovecot-cvs mailing list