From: Timo Sirainen Date: Mon, 24 Aug 2009 17:15:34 +0000 (-0400) Subject: master: If execv() fails with ENOMEM, mention the vsz_limit setting. X-Git-Tag: 2.0.alpha1~244 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7a76c07e6411277abd054e5f536918d8f472b7b3;p=thirdparty%2Fdovecot%2Fcore.git master: If execv() fails with ENOMEM, mention the vsz_limit setting. --HG-- branch : HEAD --- diff --git a/src/master/main.c b/src/master/main.c index a4cb5a5407..df34a4139c 100644 --- a/src/master/main.c +++ b/src/master/main.c @@ -77,8 +77,9 @@ void process_exec(const char *cmd, const char *extra_args[]) /* 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,