From 98de32a681e0adba5983c0154a242128bdb1567e Mon Sep 17 00:00:00 2001 From: Hartmut Becker Date: Sun, 31 Aug 2014 23:52:25 +0200 Subject: Enhance/fix VMS ONESHELL implementation and command execution * job.c, vmsjobs.c: fix some double quote and new line handling; implement ONESHELL with writing multiple lines into one DCL command procedure; in ONESHELL allow VMS/make internal redirection only on the first line; fix the created DCL command procedure, which didn't abort on errors; return correct exit status from the DCL command procedure; preserve current procedure verification; make the generated command procedure more robust. --- job.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'job.c') diff --git a/job.c b/job.c index c52a03a..f650a53 100644 --- a/job.c +++ b/job.c @@ -1225,21 +1225,22 @@ start_job_command (struct child *child) multi-line variables still includes the newlines. So detect newlines and set 'end' (which is used for child->command_ptr) instead of (re-)writing construct_command_argv */ - { - char *s = p; - int instring = 0; - while (*s) - { - if (*s == '"') - instring = !instring; - else if (*s == '\n' && !instring) - { - end = s; - break; - } - ++s; - } - } + if (!one_shell) + { + char *s = p; + int instring = 0; + while (*s) + { + if (*s == '"') + instring = !instring; + else if (*s == '\n' && !instring) + { + end = s; + break; + } + ++s; + } + } #else argv = construct_command_argv (p, &end, child->file, child->file->cmds->lines_flags[child->command_line - 1], -- cgit v1.2.3