summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--job.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/job.c b/job.c
index cdc2612..59e945a 100644
--- a/job.c
+++ b/job.c
@@ -1244,6 +1244,12 @@ construct_command_argv_internal (line, restp, shell, ifs)
/* Inside a string, just copy any char except a closing quote. */
if (*p == '\'')
instring = 0;
+ else if (*p == '\n' && restp != NULL)
+ {
+ /* End of the command line. */
+ *restp = p;
+ goto end_of_line;
+ }
else
*ap++ = *p;
}