- Timestamp:
- 01/07/12 22:35:59 (13 years ago)
- Location:
- trunk/pbs_drmaa
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/pbs_drmaa/session.c
r52 r53 22 22 #endif 23 23 24 #include <pwd.h> 24 25 #include <stdlib.h> 25 26 #include <string.h> … … 115 116 self->max_retries_count = 3; 116 117 self->wait_thread_sleep_time = 1; 118 self->job_exit_status_file_prefix = NULL; 117 119 118 120 self->super.load_configuration( &self->super, "pbs_drmaa" ); … … 136 138 } 137 139 138 self->job_exit_status_file_prefix = NULL;139 140 } 140 141 EXCEPT_DEFAULT … … 294 295 } 295 296 296 if (mkdir(pbsself->job_exit_status_file_prefix, 0600) == -1 && errno != EEXIST) /* TODO it would be much better to do stat before */ 297 fsd_log_debug(("Trying to create state directory: %s", pbsself->job_exit_status_file_prefix)); 298 299 if (mkdir(pbsself->job_exit_status_file_prefix, 0700) == -1 && errno != EEXIST) /* TODO it would be much better to do stat before */ 297 300 { 298 fsd_log_warning( "Failed to create job state directory: %s. Valid job exit status may not be available in some cases.", pbsself->job_exit_status_file_prefix)301 fsd_log_warning(("Failed to create job state directory: %s. Valid job exit status may not be available in some cases.", pbsself->job_exit_status_file_prefix)); 299 302 } 300 303 -
trunk/pbs_drmaa/submit.c
r52 r53 336 336 if( wd != NULL ) 337 337 script_len += strlen("cd ") + strlen(wd) + strlen("; "); 338 script_len += strlen( "exec ") + strlen(executable);338 script_len += strlen(executable); 339 339 if( argv != NULL ) 340 340 for( i = argv; *i != NULL; i++ ) … … 342 342 if( input_path != NULL ) 343 343 script_len += strlen(" <") + strlen(input_path); 344 if (((pbsdrmaa_session_t )self->session)->job_exit_status_file_prefix)345 script_len += strlen("; echo $? >") + strlen(((pbsdrmaa_session_t )self->session)->job_exit_status_file_prefix) + strlen("/$PBS_JOBID.exitcode");344 if (((pbsdrmaa_session_t *)self->session)->job_exit_status_file_prefix) 345 script_len += strlen("; echo $? >") + strlen(((pbsdrmaa_session_t *)self->session)->job_exit_status_file_prefix) + strlen("/$PBS_JOBID.exitcode"); 346 346 } 347 347 … … 353 353 if( wd != NULL ) 354 354 s += sprintf( s, "cd %s; ", wd ); 355 s += sprintf( s, " exec%s", executable );355 s += sprintf( s, "%s", executable ); 356 356 if( argv != NULL ) 357 357 for( i = argv; *i != NULL; i++ ) … … 359 359 if( input_path != NULL ) 360 360 s += sprintf( s, " <%s", input_path ); 361 if (((pbsdrmaa_session_t )self->session)->job_exit_status_file_prefix)362 s += sprintf( s, "; echo $? >%s/$PBS_JOBID.exitcode", ((pbsdrmaa_session_t )self->session)->job_exit_status_file_prefix);361 if (((pbsdrmaa_session_t *)self->session)->job_exit_status_file_prefix) 362 s += sprintf( s, "; echo $? >%s/$PBS_JOBID.exitcode", ((pbsdrmaa_session_t *)self->session)->job_exit_status_file_prefix); 363 363 364 364 fsd_assert( s == script+script_len );
Note: See TracChangeset
for help on using the changeset viewer.