Changeset 1662
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/base.h
r1653 r1662 453 453 454 454 unsigned short dont_daemonize; 455 unsigned short daemonize_on_shutdown; 455 456 buffer *changeroot; 456 457 buffer *username; -
trunk/src/server.c
r1653 r1662 478 478 " -t test the config-file, and exit\n" \ 479 479 " -D don't go to background (default: go to background)\n" \ 480 " -I go to background on SIGINT (useful with -D)\n" \ 481 " has no effect when using kqueue or /dev/poll\n" \ 480 482 " -v show version\n" \ 481 483 " -V show compile-time features\n" \ … … 814 816 srv_socket->sock->fd = -1; 815 817 818 #ifdef HAVE_FORK 819 /* FreeBSD kqueue could possibly work with rfork(RFFDG) 820 * while Solaris /dev/poll would require re-registering 821 * all fd */ 822 if (srv->srvconf.daemonize_on_shutdown && 823 srv->event_handler != FDEVENT_HANDLER_FREEBSD_KQUEUE && 824 srv->event_handler != FDEVENT_HANDLER_SOLARIS_DEVPOLL) { 825 daemonize(); 826 } 827 #endif 828 816 829 /* network_close() will cleanup after us */ 817 830 } … … 1059 1072 #endif 1060 1073 srv->srvconf.dont_daemonize = 0; 1074 srv->srvconf.daemonize_on_shutdown = 0; 1061 1075 srv->srvconf.max_stat_threads = 4; 1062 1076 srv->srvconf.max_read_threads = 8; 1063 1077 1064 while(-1 != (o = getopt(argc, argv, "f:m:hvVD pt"))) {1078 while(-1 != (o = getopt(argc, argv, "f:m:hvVDIpt"))) { 1065 1079 switch(o) { 1066 1080 case 'f': … … 1076 1090 case 't': test_config = 1; break; 1077 1091 case 'D': srv->srvconf.dont_daemonize = 1; break; 1092 case 'I': srv->srvconf.daemonize_on_shutdown = 1; break; 1078 1093 case 'v': show_version(); return 0; 1079 1094 case 'V': show_features(); return 0;

