Changeset 56 for trunk/pbs_drmaa/job.c
- Timestamp:
- 01/08/12 17:21:05 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/pbs_drmaa/job.c
r55 r56 508 508 pbsdrmaa_job_read_exit_status( const char *job_id, const char *job_state_dir_prefix) 509 509 { 510 char *status_file = NULL ;510 char *status_file = NULL, start_file = NULL; 511 511 FILE *fhandle = NULL; 512 512 int exit_status = -1; … … 515 515 516 516 status_file = fsd_asprintf("%s/%s.exitcode", job_state_dir_prefix, job_id); 517 start_file = fsd_asprintf("%s/%s.started", job_id, job_state_dir_prefix); 517 518 518 519 if ((fhandle = fopen(status_file, "r")) == NULL) 519 520 { 521 struct stat tmpstat; 522 520 523 fsd_log_error(("Failed to open job status file: %s", status_file)); 524 if (stat(start_file, &tmpstat) == 0 && (tmpstat.st_mode & S_IFREG)) 525 { 526 exit_status = 143; /* SIGTERM */ 527 fsd_log_info("But start file exist %s. Assuming that job was killed (exit_status=%d).", start_file, exit_status); 528 } 521 529 } 522 530 else … … 527 535 528 536 fsd_free(status_file); 537 fsd_free(start_file); 529 538 530 539 return exit_status;
Note: See TracChangeset
for help on using the changeset viewer.