Mercurial > dovecot > original-hg > dovecot-1.2
diff src/master/main.c @ 2235:dcff4c088f1a HEAD
DEBUG: If GDB environment is set, don't do fd leak checks.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 23 Jun 2004 20:48:35 +0300 |
parents | 55e3412ae995 |
children | 6aa77fdf152e |
line wrap: on
line diff
--- a/src/master/main.c Wed Jun 23 20:47:06 2004 +0300 +++ b/src/master/main.c Wed Jun 23 20:48:35 2004 +0300 @@ -37,6 +37,9 @@ struct hash_table *pids; int null_fd, inetd_login_fd; uid_t master_uid; +#ifdef DEBUG +static int gdb; +#endif int validate_str(const char *str, size_t max_len) { @@ -57,6 +60,10 @@ /* we'll log through master process */ env_put("LOG_TO_MASTER=1"); + +#ifdef DEBUG + if (gdb) env_put("GDB=1"); +#endif } static void sig_quit(int signo __attr_unused__) @@ -469,6 +476,9 @@ exit(FATAL_DEFAULT); open_fds(); +#ifdef DEBUG + gdb = getenv("GDB") != NULL; +#endif /* we don't need any environment */ env_clean();