server.c revision f85ae5fce84ad7bdc515c1ec324b9c56cb1a39b2
fa9e4066f08beec538e775443c5be79dd423fcabahrens Servers setup routines
1d452cf5123cb6ac0a013a4dbd4dcceeb0da314dahrens Copyright (C) Andrew Tridgell 1992-2005
fa9e4066f08beec538e775443c5be79dd423fcabahrens Copyright (C) Martin Pool 2002
fa9e4066f08beec538e775443c5be79dd423fcabahrens Copyright (C) Jelmer Vernooij 2002
fa9e4066f08beec538e775443c5be79dd423fcabahrens Copyright (C) James J Myers 2003 <myersjj@samba.org>
fa9e4066f08beec538e775443c5be79dd423fcabahrens Copyright (C) Simo Sorce 2008
fa9e4066f08beec538e775443c5be79dd423fcabahrens This program is free software; you can redistribute it and/or modify
fa9e4066f08beec538e775443c5be79dd423fcabahrens it under the terms of the GNU General Public License as published by
fa9e4066f08beec538e775443c5be79dd423fcabahrens the Free Software Foundation; either version 3 of the License, or
fa9e4066f08beec538e775443c5be79dd423fcabahrens (at your option) any later version.
fa9e4066f08beec538e775443c5be79dd423fcabahrens This program is distributed in the hope that it will be useful,
fa9e4066f08beec538e775443c5be79dd423fcabahrens but WITHOUT ANY WARRANTY; without even the implied warranty of
fa9e4066f08beec538e775443c5be79dd423fcabahrens MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
fa9e4066f08beec538e775443c5be79dd423fcabahrens GNU General Public License for more details.
148434217c040ea38dc844384f6ba68d9b325906Matthew Ahrens You should have received a copy of the GNU General Public License
fa9e4066f08beec538e775443c5be79dd423fcabahrens along with this program. If not, see <http://www.gnu.org/licenses/>.
fa9e4066f08beec538e775443c5be79dd423fcabahrens#include "../events/events.h"
fa9e4066f08beec538e775443c5be79dd423fcabahrens#include "../ldb/include/ldb.h"
fa9e4066f08beec538e775443c5be79dd423fcabahrens /* cycle log/debug files */
static void setup_signals(void)
#if defined(SIGFPE)
#if defined(SIGUSR2)
uint8_t c;
#if HAVE_GETPGRP
exit(0);
bool opt_daemon = false;
bool opt_interactive = false;
int opt;
bool is_monitor = false;
{ NULL }
switch(opt) {
case OPT_DAEMON:
opt_daemon = true;
case OPT_INTERACTIVE:
opt_interactive = true;
if (!service) {
if (is_monitor) {
} else if (!opt_interactive) {
opt_daemon = true;
if (opt_daemon) {
become_daemon(true);
if (opt_interactive) {
stdin_event_flags = 0;
#ifdef SIGTTIN
if (is_monitor) {
service);