From 4c995f262aa93fa41e0e6075b9c71a4db3bc6632 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 30 Sep 2008 11:19:58 +0000 Subject: * job.c (construct_command_argv_internal): Avoid extra backslash in batch-mode Unixy shells. Under DB_JOBS, display the contents of the batch file. --- ChangeLog | 6 ++++++ job.c | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b8194cf..b380147 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-09-30 David Russo (tiny change) + + * job.c (construct_command_argv_internal): Avoid extra backslash + in batch-mode Unixy shells. Under DB_JOBS, display the contents + of the batch file. + 2008-05-31 Eli Zaretskii * README.W32.template: Remove obsolete text about non-support for diff --git a/job.c b/job.c index 82f7c0b..27999f8 100644 --- a/job.c +++ b/job.c @@ -2746,7 +2746,11 @@ construct_command_argv_internal (char *line, char **restp, char *shell, if (PRESERVE_BSNL) { *(ap++) = '\\'; - *(ap++) = '\\'; + /* Only non-batch execution needs another backslash, + because it will be passed through a recursive + invocation of this function. */ + if (!batch_mode_shell) + *(ap++) = '\\'; *(ap++) = '\n'; } ++p; @@ -2807,6 +2811,8 @@ construct_command_argv_internal (char *line, char **restp, char *shell, fputs (command_ptr, batch); fputc ('\n', batch); fclose (batch); + DB (DB_JOBS, (_("Batch file contents:%s\n\t%s\n"), + !unixy_shell ? "\n\t@echo off" : "", command_ptr)); /* create argv */ new_argv = xmalloc(3 * sizeof (char *)); -- cgit v1.2.3