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