Changeset aefa26aefdd4538de7337e9c9b0cced45abb1d74

Show
Ignore:
Timestamp:
09/18/09 17:29:58 (3 years ago)
Author:
Neutron Soutmun <neo.neutron@…>
Children:
c9d8db9916965607ae249b301f1991b931044ee8
Parents:
8099ec906a89243a29bf56431c7f4ad523fdbf67
git-committer:
Neutron Soutmun <neo.neutron@…> (09/18/09 17:29:58)
Message:

Fix daemon get stuck at 100% CPU when no log file

  • Fix daemon get stuck when the log file does not exists, requested access to the file is not allowed or any errors. (Thanks Theppitak for the issue of this case)
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/rahunasd.c

    r927d0c7 raefa26a  
    183183    rh_main_server->log_fd = rh_openlog(rh_main_server->main_config->log_file); 
    184184 
    185     if (!rh_main_server->log_fd) { 
     185    if (rh_main_server->log_fd == -1) { 
    186186      syslog(LOG_ERR, "Could not open log file %s\n",  
    187187             rh_main_server->main_config->log_file); 
     
    347347    rh_main_server->log_fd = rh_openlog(rh_main_server->main_config->log_file); 
    348348 
    349     if (!rh_main_server->log_fd) { 
     349    if (rh_main_server->log_fd == -1) { 
    350350      syslog(LOG_ERR, "Could not open log file %s\n",  
    351351             rh_main_server->main_config->log_file);