version 1.72, 2007/09/17 10:31:13 |
version 1.73, 2007/09/17 10:33:28 |
|
|
argv[0] = (char *)shellName; |
argv[0] = (char *)shellName; |
argc = 1; |
argc = 1; |
|
|
if ((commandShell->exit && *commandShell->exit != '-') || |
(void)snprintf(args, sizeof(args), "-%s%s", |
(commandShell->echo && *commandShell->echo != '-')) { |
(job->flags & JOB_IGNERR) ? "" : SHELL_ERROR_FLAG, |
/* |
(job->flags & JOB_SILENT) ? "" : SHELL_ECHO_FLAG); |
* At least one of the flags doesn't have a minus before it, so |
|
* merge them together. Have to do this because the |
|
* *(&(@*#*&#$# Bourne shell thinks its second argument is a |
|
* file to source. Grrrr. Note the ten-character limitation on |
|
* the combined arguments. |
|
*/ |
|
(void)snprintf(args, sizeof(args), "-%s%s", |
|
((job->flags & JOB_IGNERR) ? "" : |
|
(commandShell->exit ? commandShell->exit : "")), |
|
((job->flags & JOB_SILENT) ? "" : |
|
(commandShell->echo ? commandShell->echo : ""))); |
|
|
|
if (args[1]) { |
if (args[1]) { |
argv[argc] = args; |
argv[argc] = args; |
argc++; |
argc++; |
} |
} |
} else { |
|
if (!(job->flags & JOB_IGNERR) && commandShell->exit) { |
|
argv[argc] = commandShell->exit; |
|
argc++; |
|
} |
|
if (!(job->flags & JOB_SILENT) && commandShell->echo) { |
|
argv[argc] = commandShell->echo; |
|
argc++; |
|
} |
|
} |
|
argv[argc] = NULL; |
argv[argc] = NULL; |
} |
} |
|
|