summaryrefslogtreecommitdiff
path: root/job.c
diff options
context:
space:
mode:
authorHartmut Becker <becker.ismaning@freenet.de>2014-08-31 23:52:25 +0200
committerPaul Smith <psmith@gnu.org>2014-09-07 18:01:35 -0400
commit98de32a681e0adba5983c0154a242128bdb1567e (patch)
tree3d2dbcf2a292ae24cbd97ae9fa0209bbcc106313 /job.c
parent5369be5079fb66300e63d3a52a7735e1504b7073 (diff)
downloadgunmake-98de32a681e0adba5983c0154a242128bdb1567e.tar.gz
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.
Diffstat (limited to 'job.c')
-rw-r--r--job.c31
1 files changed, 16 insertions, 15 deletions
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],