Commit ebf4c8f6 ebf4c8f63c0d7758e4067de4d4f1dd959b0c2095 by Wojciech Polak

(main): Call daemon_create_pidfile() if the -P or --pidfile=FILE option was specified.

(daemon_param): Set initial NULL for the pidfile name.
1 parent 695bef7e
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
Copyright (C) 1999, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -28,7 +28,8 @@ struct daemon_param daemon_param = {
20, /* Default maximum number of children */
143, /* Standard IMAP4 port */
1800, /* RFC2060: 30 minutes. */
0 /* No transcript by default */
0, /* No transcript by default */
NULL /* No PID file by default */
};
int login_disabled;
......@@ -197,6 +198,11 @@ main (int argc, char **argv)
umask (S_IROTH | S_IWOTH | S_IXOTH); /* 007 */
if (daemon_param.pidfile)
{
daemon_create_pidfile (daemon_param.pidfile);
}
/* Check TLS environment, i.e. cert and key files */
#ifdef WITH_TLS
starttls_init ();
......
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -28,6 +28,7 @@ struct daemon_param daemon_param = {
110, /* Standard POP3 port */
600, /* Idle timeout */
0, /* No transcript by default */
NULL /* No PID file by default */
};
int debug_mode;
......@@ -219,6 +220,11 @@ main (int argc, char **argv)
umask (S_IROTH | S_IWOTH | S_IXOTH); /* 007 */
if (daemon_param.pidfile)
{
daemon_create_pidfile (daemon_param.pidfile);
}
/* Check TLS environment, i.e. cert and key files */
#ifdef WITH_TLS
tls_available = mu_check_tls_environment ();
......