Changeset 69 for trunk


Ignore:
Timestamp:
03/03/12 20:56:49 (7 years ago)
Author:
mmamonski
Message:

save exit status correctly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pbs_drmaa/submit.c

    r67 r69  
    355355                        script_len += strlen(" <") + strlen(input_path); 
    356356 
    357                 script_len += strlen("; echo $? >") + strlen(((pbsdrmaa_session_t *)self->session)->job_exit_status_file_prefix) + strlen("/$PBS_JOBID.exitcode"); 
     357                script_len += strlen(";EXIT_CODE=$?; echo $EXIT_CODE >") + strlen(((pbsdrmaa_session_t *)self->session)->job_exit_status_file_prefix) + strlen("/$PBS_JOBID.exitcode; exit $EXIT_CODE"); 
    358358         } 
    359359 
     
    373373                        s += sprintf( s, " <%s", input_path ); 
    374374 
    375                 s += sprintf( s, "; echo $? >%s/$PBS_JOBID.exitcode", ((pbsdrmaa_session_t *)self->session)->job_exit_status_file_prefix); 
     375                s += sprintf( s, ";EXIT_CODE=$?; echo $EXIT_CODE >%s/$PBS_JOBID.exitcode; exit $EXIT_CODE", ((pbsdrmaa_session_t *)self->session)->job_exit_status_file_prefix); 
    376376 
    377377                fsd_assert( s == script+script_len ); 
Note: See TracChangeset for help on using the changeset viewer.