changeset 9808:aad3157d52a1 HEAD

master: If execv() fails with ENOMEM, mention the vsz_limit setting.
author Timo Sirainen <tss@iki.fi>
date Mon, 24 Aug 2009 13:15:34 -0400
parents 41188b7db88a
children fa76c740ee41
files src/master/main.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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 @@
 	/* 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,