]>
Commit | Line | Data |
---|---|---|
67872052 JR |
1 | --- fvwm-1.24r/fvwm/configure.c.marc Thu Jan 4 10:35:31 1996 |
2 | +++ fvwm-1.24r/fvwm/configure.c Tue Jan 9 10:35:28 1996 | |
3 | @@ -1976,6 +1976,7 @@ | |
4 | char *vc; /* Visual Class */ | |
5 | FILE *tmpf; | |
6 | struct passwd *pwent; | |
7 | + int fd; | |
8 | /* Generate a temporary filename. Honor the TMPDIR environment variable, | |
9 | if set. Hope nobody deletes this file! */ | |
10 | ||
11 | @@ -1993,12 +1994,18 @@ | |
12 | exit(0377); | |
13 | } | |
14 | ||
15 | + if ((fd = open(tmp_name, O_WRONLY|O_EXCL|O_CREAT, S_IRUSR|S_IWUSR)) < 0) { | |
16 | + perror("exclusive open for tmp_name failed in m4_defs"); | |
17 | + exit(0377); | |
18 | + } | |
19 | + close(fd); | |
20 | + | |
21 | /* | |
22 | * Create the appropriate command line to run m4, and | |
23 | * open a pipe to the command. | |
24 | */ | |
25 | ||
26 | - sprintf(options, "%s %s %s > %s\n", | |
27 | + sprintf(options, "%s %s %s >& %s\n", | |
28 | m4_prog, | |
29 | ((m4_prefix == 0) ? "" : "--prefix-builtins"), | |
30 | m4_options, tmp_name); |