comparison svr-main.c @ 1210:64a50eac1030

Moved usingsyslog from svr_runopts to runopts.
author Konstantin Tokarev <ktokarev@smartlabs.tv>
date Tue, 01 Dec 2015 21:52:38 +0300
parents 2265d7ebfdeb
children 6ecc133fb2ee
comparison
equal deleted inserted replaced
1209:ab7d9c12caa7 1210:64a50eac1030
143 143
144 /* fork */ 144 /* fork */
145 if (svr_opts.forkbg) { 145 if (svr_opts.forkbg) {
146 int closefds = 0; 146 int closefds = 0;
147 #ifndef DEBUG_TRACE 147 #ifndef DEBUG_TRACE
148 if (!svr_opts.usingsyslog) { 148 if (!opts.usingsyslog) {
149 closefds = 1; 149 closefds = 1;
150 } 150 }
151 #endif 151 #endif
152 if (daemon(0, closefds) < 0) { 152 if (daemon(0, closefds) < 0) {
153 dropbear_exit("Failed to daemonize: %s", strerror(errno)); 153 dropbear_exit("Failed to daemonize: %s", strerror(errno));
365 /* Things used by inetd and non-inetd modes */ 365 /* Things used by inetd and non-inetd modes */
366 static void commonsetup() { 366 static void commonsetup() {
367 367
368 struct sigaction sa_chld; 368 struct sigaction sa_chld;
369 #ifndef DISABLE_SYSLOG 369 #ifndef DISABLE_SYSLOG
370 if (svr_opts.usingsyslog) {
371 startsyslog(); 370 startsyslog();
371 if (opts.usingsyslog) {
372 } 372 }
373 #endif 373 #endif
374 374
375 /* set up cleanup handler */ 375 /* set up cleanup handler */
376 if (signal(SIGINT, sigintterm_handler) == SIG_ERR || 376 if (signal(SIGINT, sigintterm_handler) == SIG_ERR ||