Expand PMF_FN_* macros.
[netbsd-mini2440.git] / external / ibm-public / postfix / dist / src / master / master_service.c
blobd3d1b128076fd8de7ffc127a04e1f10c2e962994
1 /* $NetBSD$ */
3 /*++
4 /* NAME
5 /* master_service 3
6 /* SUMMARY
7 /* Postfix master - start/stop services
8 /* SYNOPSIS
9 /* #include "master.h"
11 /* void master_start_service(serv)
12 /* MASTER_SERV *serv;
14 /* void master_stop_service(serv)
15 /* MASTER_SERV *serv;
17 /* void master_restart_service(serv)
18 /* MASTER_SERV *serv;
19 /* DESCRIPTION
20 /* master_start_service() enables the named service.
22 /* master_stop_service() disables named service.
24 /* master_restart_service() requests all running child processes to
25 /* commit suicide. This is typically used after a configuration reload.
26 /* DIAGNOSTICS
27 /* BUGS
28 /* SEE ALSO
29 /* master_avail(3), process creation policy
30 /* master_wakeup(3), service automatic wakeup
31 /* master_status(3), child status reports
32 /* master_listen(3), unix/inet listeners
33 /* LICENSE
34 /* .ad
35 /* .fi
36 /* The Secure Mailer license must be distributed with this software.
37 /* AUTHOR(S)
38 /* Wietse Venema
39 /* IBM T.J. Watson Research
40 /* P.O. Box 704
41 /* Yorktown Heights, NY 10598, USA
42 /*--*/
44 /* System libraries. */
46 #include <sys_defs.h>
47 #include <string.h>
48 #include <unistd.h>
50 /* Utility library. */
52 #include <msg.h>
53 #include <mymalloc.h>
55 /* Application-specific. */
57 #include "master.h"
59 MASTER_SERV *master_head;
61 /* master_start_service - activate service */
63 void master_start_service(MASTER_SERV *serv)
67 * Enable connection requests, wakeup timers, and status updates from
68 * child processes.
70 master_listen_init(serv);
71 master_avail_listen(serv);
72 master_status_init(serv);
73 master_wakeup_init(serv);
76 /* master_stop_service - deactivate service */
78 void master_stop_service(MASTER_SERV *serv)
82 * Undo the things that master_start_service() did.
84 master_wakeup_cleanup(serv);
85 master_status_cleanup(serv);
86 master_avail_cleanup(serv);
87 master_listen_cleanup(serv);
90 /* master_restart_service - restart service after configuration reload */
92 void master_restart_service(MASTER_SERV *serv)
96 * Undo some of the things that master_start_service() did.
98 master_wakeup_cleanup(serv);
99 master_status_cleanup(serv);
102 * Now undo the undone.
104 master_status_init(serv);
105 master_wakeup_init(serv);