version 1.53, 2003/02/18 13:14:43 |
version 1.54, 2003/04/06 22:47:14 |
|
|
* Bourne shell thinks its second argument is a file to source. |
* Bourne shell thinks its second argument is a file to source. |
* Grrrr. Note the ten-character limitation on the combined arguments. |
* Grrrr. Note the ten-character limitation on the combined arguments. |
*/ |
*/ |
(void)sprintf(args, "-%s%s", |
(void)snprintf(args, sizeof(args), "-%s%s", |
((job->flags & JOB_IGNERR) ? "" : |
((job->flags & JOB_IGNERR) ? "" : |
(commandShell->exit ? commandShell->exit : "")), |
(commandShell->exit ? commandShell->exit : "")), |
((job->flags & JOB_SILENT) ? "" : |
((job->flags & JOB_SILENT) ? "" : |
|
|
} else { |
} else { |
(void)fprintf(stdout, "Remaking `%s'\n", gn->name); |
(void)fprintf(stdout, "Remaking `%s'\n", gn->name); |
(void)fflush(stdout); |
(void)fflush(stdout); |
(void)strcpy(job->outFile, TMPPAT); |
(void)strlcpy(job->outFile, TMPPAT, sizeof(job->outFile)); |
if ((job->outFd = mkstemp(job->outFile)) == -1) |
if ((job->outFd = mkstemp(job->outFile)) == -1) |
Punt("Cannot create temp file: %s", strerror(errno)); |
Punt("Cannot create temp file: %s", strerror(errno)); |
(void)fcntl(job->outFd, F_SETFD, 1); |
(void)fcntl(job->outFd, F_SETFD, 1); |
|
|
GNode *begin; /* node for commands to do at the very start */ |
GNode *begin; /* node for commands to do at the very start */ |
int tfd; |
int tfd; |
|
|
(void)strcpy(tfile, TMPPAT); |
(void)strlcpy(tfile, TMPPAT, sizeof(tfile)); |
if ((tfd = mkstemp(tfile)) == -1) |
if ((tfd = mkstemp(tfile)) == -1) |
Punt("Cannot create temp file: %s", strerror(errno)); |
Punt("Cannot create temp file: %s", strerror(errno)); |
else |
else |