fix for STDERR problem in rend-unix
This commit is contained in:
parent
ea2eeb24b1
commit
9e5f21db7f
|
@ -162,7 +162,6 @@ int main(int argc, char *argv[]) {
|
||||||
int option;
|
int option;
|
||||||
char *configfile=DEFAULT_CONFIGFILE;
|
char *configfile=DEFAULT_CONFIGFILE;
|
||||||
WSCONFIG ws_config;
|
WSCONFIG ws_config;
|
||||||
int foreground=0;
|
|
||||||
int reload=0;
|
int reload=0;
|
||||||
int start_time;
|
int start_time;
|
||||||
int end_time;
|
int end_time;
|
||||||
|
@ -187,6 +186,7 @@ int main(int argc, char *argv[]) {
|
||||||
config.use_mdns=1;
|
config.use_mdns=1;
|
||||||
err_setlevel(1);
|
err_setlevel(1);
|
||||||
|
|
||||||
|
config.foreground=0;
|
||||||
while((option=getopt(argc,argv,"D:d:c:P:mfrysiu")) != -1) {
|
while((option=getopt(argc,argv,"D:d:c:P:mfrysiu")) != -1) {
|
||||||
switch(option) {
|
switch(option) {
|
||||||
case 'd':
|
case 'd':
|
||||||
|
@ -199,7 +199,7 @@ int main(int argc, char *argv[]) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'f':
|
case 'f':
|
||||||
foreground=1;
|
config.foreground=1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'c':
|
case 'c':
|
||||||
|
@ -264,7 +264,7 @@ int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
DPRINTF(E_LOG,L_MAIN,"Starting with debuglevel %d\n",err_getlevel());
|
DPRINTF(E_LOG,L_MAIN,"Starting with debuglevel %d\n",err_getlevel());
|
||||||
|
|
||||||
if(!foreground) {
|
if(!config.foreground) {
|
||||||
size = PATH_MAX;
|
size = PATH_MAX;
|
||||||
if(conf_get_string("general","logfile",NULL,logfile,&size) == CONF_E_SUCCESS) {
|
if(conf_get_string("general","logfile",NULL,logfile,&size) == CONF_E_SUCCESS) {
|
||||||
err_setdest(logfile,LOGDEST_LOGFILE);
|
err_setdest(logfile,LOGDEST_LOGFILE);
|
||||||
|
@ -284,7 +284,7 @@ int main(int argc, char *argv[]) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(!os_init(foreground)) {
|
if(!os_init(config.foreground)) {
|
||||||
DPRINTF(E_LOG,L_MAIN,"Could not initialize server\n");
|
DPRINTF(E_LOG,L_MAIN,"Could not initialize server\n");
|
||||||
os_deinit();
|
os_deinit();
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
|
|
Loading…
Reference in New Issue