]> git.sur5r.net Git - openldap/blob - servers/slurpd/admin.c
Update named referrals to draft-zeilenga-ldap-namedref.txt
[openldap] / servers / slurpd / admin.c
1 /* $OpenLDAP$ */
2 /*
3  * Copyright (c) 1996 Regents of the University of Michigan.
4  * All rights reserved.
5  *
6  * Redistribution and use in source and binary forms are permitted
7  * provided that this notice is preserved and that due credit is given
8  * to the University of Michigan at Ann Arbor. The name of the University
9  * may not be used to endorse or promote products derived from this
10  * software without specific prior written permission. This software
11  * is provided ``as is'' without express or implied warranty.
12  */
13
14 /*
15  * admin.c - routines for performing administrative tasks, e.g. on-the-fly
16  * reconfiguration of slurpd.
17  */
18
19 #include "portable.h"
20
21 #include <stdio.h>
22
23 #include <ac/signal.h>
24
25 #include "slurp.h"
26 #include "globals.h"
27
28
29 /*
30  * Eventually, do_admin will be the entry point for performing
31  * administrative tasks.  General idea: put commands in a file
32  * somewhere, send slurpd a USR2 signal.  The handler for
33  * USR2 (this routine) reads the file and takes some action.
34  *
35  * For right now, this routine has been hijacked for debugging.  When
36  * slurpd receives a USR2 signal, it will dump its replication 
37  * queue to the disk file given by SLURPD_DUMPFILE.
38  */
39 RETSIGTYPE
40 do_admin( int sig )
41 {
42     sglob->rq->rq_dump( sglob->rq );
43     (void) SIGNAL_REINSTALL( sig, do_admin );
44 }