Changeset f0555be1474aedabc7e5fefccaadb1bb838098b5

Show
Ignore:
Timestamp:
11/08/09 04:45:16 (4 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1257655516 +0000
git-parent:

[aa5fee138e8ecb6061f30f86cb3c1f055d8df465]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1257655516 +0000
Message:

step one... trigger a full log reopen on child_main. This will address checkpoint cleanups on caugh crashes. refs #215

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/noitd.c

    r670f01e rf0555be  
    163163  } 
    164164 
     165  noit_log_reopen_all(); 
     166 
    165167  signal(SIGHUP, request_conf_reload); 
    166168 
  • src/utils/noit_log.c

    r88a7178 rf0555be  
    470470} 
    471471 
     472int 
     473noit_log_reopen_all() { 
     474  noit_hash_iter iter = NOIT_HASH_ITER_ZERO; 
     475  const char *k; 
     476  int klen, rv = 0; 
     477  void *data; 
     478  noit_log_stream_t ls; 
     479 
     480  while(noit_hash_next(&noit_loggers, &iter, &k, &klen, &data)) { 
     481    ls = data; 
     482    if(ls->ops) if(ls->ops->reopenop(ls) < 0) rv = -1; 
     483  } 
     484  return rv; 
     485} 
     486 
  • src/utils/noit_log.h

    r79d4050 rf0555be  
    7070 
    7171API_EXPORT(void) noit_log_init(); 
     72API_EXPORT(int) noit_log_reopen_all(); 
    7273API_EXPORT(void) noit_register_logops(const char *name, logops_t *ops); 
    7374API_EXPORT(noit_log_stream_t)