Ver Fonte

fixed: race condition on service stop / restart

Do not close -l file descriptor while there are alive childrent
z3APA3A há 7 anos atrás
pai
commit
78e180a054
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      src/proxymain.c

+ 1 - 1
src/proxymain.c

@@ -802,7 +802,6 @@ int MODULEMAINFUNC (int argc, char** argv){
  }
 
  if(!srv.silent) srv.logfunc(&defparam, (unsigned char *)"Exiting thread");
- if(fp) fclose(fp);
 
  srvfree(&srv);
 
@@ -820,6 +819,7 @@ int MODULEMAINFUNC (int argc, char** argv){
  if(defparam.hostname)myfree(defparam.hostname);
  if(cbc_string)myfree(cbc_string);
  if(cbl_string)myfree(cbl_string);
+ if(fp) fclose(fp);
 
  return 0;
 }