diff options
Diffstat (limited to 'job.c')
-rw-r--r-- | job.c | 27 |
1 files changed, 24 insertions, 3 deletions
@@ -1224,6 +1224,19 @@ start_job_command (struct child *child) { char *end = 0; #ifdef VMS + /* Skip any leading whitespace */ + while (*p) + { + if (!isspace(*p)) + { + if (*p != '\\') + break; + if ((p[1] != '\n') && (p[1] != 'n') && (p[1] != 't')) + break; + } + p++; + } + argv = p; /* Although construct_command_argv contains some code for VMS, it was/is not called/used. Please note, for VMS argv is a string (not an array @@ -1273,9 +1286,17 @@ start_job_command (struct child *child) free (argv[0]); free (argv); #endif - child->file->update_status = us_question; - notice_finished_file (child->file); - return; +#ifdef VMS + /* On VMS, argv[0] can be a null string here */ + if (argv[0] != 0) + { +#endif + child->file->update_status = us_question; + notice_finished_file (child->file); + return; +#ifdef VMS + } +#endif } if (touch_flag && !(flags & COMMANDS_RECURSE)) |