blob: c010923f239572a244eba4cfb40eb232ca468018 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
--- proc.c.orig Mon Jul 17 23:13:54 2000
+++ proc.c Mon Jul 17 23:14:26 2000
@@ -57,13 +57,14 @@
char tmpname[20];
FILE *cfp;
long oldt;
+int fd;
/* We could use a call to make_copy() here, but this method survives
* interupts better
*/
strcpy(tmpname, "/tmp/gateXXXXXX");
- mktemp(tmpname);
- if ((cfp= fopen(tmpname,"w+")) == NULL)
+ fd = mkstemp(tmpname);
+ if ((cfp= fdopen(fd,"w+")) == NULL)
{
printf("Cannot open file %s.\n",tmpname);
return(NULL);
|