diff --git a/qtfs/rexec/rexec_shim.c b/qtfs/rexec/rexec_shim.c index 241db074f074862b40298f491dea1e2922535d46..0394ba91dc9857f8d8b14d027eece071e362ffde 100644 --- a/qtfs/rexec/rexec_shim.c +++ b/qtfs/rexec/rexec_shim.c @@ -227,18 +227,19 @@ int rexec_shim_entry(int argc, char *argv[]) char **newarg = NULL; if (strcmp(argv[0], "-f") == 0) { + rshim_log("Get json str:%s", json_str); json_str = argv[1]; newarg = &argv[2]; } else { newarg = argv; } - rshim_log("Get json str:%s", json_str); rshim_close_all_fd(); - - rshim_reg_file_resume(json_str); - rexec_log_son_rebuild(); - rshim_process_attr_resume(json_str); + if(json_str != NULL){ + rshim_reg_file_resume(json_str); + rexec_log_son_rebuild(); + rshim_process_attr_resume(json_str); + } execvp(newarg[0], newarg); perror("execvp failed.");