2 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
4 * Copyright 1998-2003 The OpenLDAP Foundation.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted only as authorized by the OpenLDAP
11 * A copy of this license is available in file LICENSE in the
12 * top-level directory of the distribution or, alternatively, at
13 * <http://www.OpenLDAP.org/license.html>.
15 /* Portions Copyright (c) 1996 Regents of the University of Michigan.
16 * All rights reserved.
18 * Redistribution and use in source and binary forms are permitted
19 * provided that this notice is preserved and that due credit is given
20 * to the University of Michigan at Ann Arbor. The name of the University
21 * may not be used to endorse or promote products derived from this
22 * software without specific prior written permission. This software
23 * is provided ``as is'' without express or implied warranty.
26 * This work was originally developed by the University of Michigan
27 * (as part of U-MICH LDAP).
31 * admin.c - routines for performing administrative tasks, e.g. on-the-fly
32 * reconfiguration of slurpd.
38 #include <ac/stdlib.h>
40 #include <ac/signal.h>
47 * Eventually, do_admin will be the entry point for performing
48 * administrative tasks. General idea: put commands in a file
49 * somewhere, send slurpd a USR2 signal. The handler for
50 * USR2 (this routine) reads the file and takes some action.
52 * For right now, this routine has been hijacked for debugging. When
53 * slurpd receives a USR2 signal, it will dump its replication
54 * queue to the disk file given by SLURPD_DUMPFILE.
59 sglob->rq->rq_dump( sglob->rq );
60 (void) SIGNAL_REINSTALL( sig, do_admin );