openbsd-ports/news/cnews/patches/patch-ad
1998-04-29 03:54:08 +00:00

21 lines
617 B
Plaintext

*** libcnews/lock.c.orig Tue Apr 28 23:48:55 1998
--- libcnews/lock.c Tue Apr 28 23:49:14 1998
***************
*** 42,49 ****
int locktries = 0;
tempnm = strsave(ctlfile(LOCKTEMP));
! (void) mktemp(tempnm);
! tempfp = fopen(tempnm, "w");
if (tempfp == NULL)
GRUMP("can't create lock temporary `%s'", tempnm);
(void) fprintf(tempfp, "%d\n", getpid());
--- 42,48 ----
int locktries = 0;
tempnm = strsave(ctlfile(LOCKTEMP));
! tempfp = fdopen(mkstemp(tempnm), "w");
if (tempfp == NULL)
GRUMP("can't create lock temporary `%s'", tempnm);
(void) fprintf(tempfp, "%d\n", getpid());