Commit 2d3adacf 2d3adacf60a8eb546979ef9dc8965a8fcafca41d by Wojciech Polak

Added new pidfile option.

1 parent 95b88948
1 /* GNU Mailutils -- a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
3 3
4 This library is free software; you can redistribute it and/or 4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public 5 modify it under the terms of the GNU Lesser General Public
...@@ -120,8 +120,10 @@ static struct argp_option mu_daemon_argp_option[] = { ...@@ -120,8 +120,10 @@ static struct argp_option mu_daemon_argp_option[] = {
120 N_("Set idle timeout value to NUMBER seconds"), 0}, 120 N_("Set idle timeout value to NUMBER seconds"), 0},
121 {"transcript", 'x', NULL, 0, 121 {"transcript", 'x', NULL, 0,
122 N_("output session transcript via syslog"), 0}, 122 N_("output session transcript via syslog"), 0},
123 {"pidfile", 'P', N_("FILE"), 0,
124 N_("Set PID file"), 0},
123 { NULL, 0, NULL, 0, NULL, 0 } 125 { NULL, 0, NULL, 0, NULL, 0 }
124 }; 126 };
125 127
126 static error_t mu_common_argp_parser __P((int key, char *arg, 128 static error_t mu_common_argp_parser __P((int key, char *arg,
127 struct argp_state *state)); 129 struct argp_state *state));
...@@ -520,7 +522,11 @@ mu_daemon_argp_parser (int key, char *arg, struct argp_state *state) ...@@ -520,7 +522,11 @@ mu_daemon_argp_parser (int key, char *arg, struct argp_state *state)
520 p->mode = MODE_DAEMON; 522 p->mode = MODE_DAEMON;
521 p->port = strtoul (arg, NULL, 10); 523 p->port = strtoul (arg, NULL, 10);
522 break; 524 break;
523 525
526 case 'P':
527 p->pidfile = arg;
528 break;
529
524 case 't': 530 case 't':
525 p->timeout = strtoul (arg, NULL, 10); 531 p->timeout = strtoul (arg, NULL, 10);
526 break; 532 break;
......