Changeset 59 for trunk/pbs_drmaa
- Timestamp:
- 01/08/12 22:02:20 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/pbs_drmaa/log_reader.c
r49 r59 231 231 { 232 232 event_timestamp = field_token; 233 #ifdef PBS_PBS_PROFESSIONAL 234 /*additional check */ 235 TRY 236 { 237 (void)pbsdrmaa_parse_log_timestamp(event_timestamp, timestamp_unix, sizeof(timestamp_unix)); 238 } 239 EXCEPT_DEFAULT 240 { 241 fsd_log_error(("Failed to parse timestamp: %s. Log corrupted?", event_timestamp)); 242 } 243 END_TRY 244 #endif 233 245 } 234 246 else if ( field_id == PBSDRMAA_FLD_ID_EVENT) … … 510 522 int num_tries = 0; 511 523 struct tm tm; 524 char *old_log_path = NULL; 512 525 513 526 fsd_log_enter(("")); … … 522 535 #define DRMAA_WAIT_THREAD_MAX_TRIES (12) 523 536 /* generate new date, close file and open new */ 524 if (self->log_path) 525 fsd_free(self->log_path); 537 old_log_path = self->log_path; 526 538 527 539 self->log_path = fsd_asprintf("%s/server_logs/%04d%02d%02d", pbssession->pbs_home, tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday); … … 562 574 self->first_open = false; 563 575 } 576 else if (old_log_path && strcmp(old_log_path, self->log_path)) 577 { 578 fsd_log_info(("PBS restarted. Seeking log file %u", (unsgined int)self->current_offset)); 579 if(fseek(self->fhandle, self->current_offset, SEEK_SET) == (off_t) -1) 580 { 581 fsd_exc_raise_fmt(FSD_ERRNO_INTERNAL_ERROR,"fseek error"); 582 } 583 } 564 584 565 585 self->date_changed = false; 566 586 587 fsd_free(old_log_path); 588 567 589 fsd_log_return(("")); 568 590 }
Note: See TracChangeset
for help on using the changeset viewer.