Re: [PATCH] HAVE_MKSTEMP tries to kill not existent tmp-file in $HOME and $TMPDIR (1.9.2)

Rado S <[email protected]>
Newsgroups gmane.network.tin.devel
Message-ID <[email protected]>
=- To [email protected] wrote on Thu 24.May'07 at 18:25:06 +0200 -=

> after revisiting this issue, I offer this attached patch:

Gna, misplaced the #endif, correction attached.

-- 
© Rado S. -- You must provide YOUR effort for your goal!
EVERY effort counts: at least to show your attitude.
You're responsible for ALL you do: you get what you give.
quiet.pat (text/plain, 715 B)
--- torg/src/my_tmpfile.c	Tue Mar 27 20:25:48 2007
+++ tgo/src/my_tmpfile.c	Thu May 24 18:28:28 2007
@@ -88,18 +88,12 @@
 		}
 #ifdef HAVE_MKSTEMP
 		fd = mkstemp(filename);
-#	ifdef DEBUG
-		if (errno)
-			wait_message(5, "HAVE_MKSTEMP %s: %s", filename, strerror(errno));
-#	endif /* DEBUG */
 #else
 #	ifdef HAVE_MKTEMP
 		fd = open(mktemp(filename), (O_WRONLY|O_CREAT|O_EXCL), (mode_t) (S_IRUSR|S_IWUSR));
-#		ifdef DEBUG
-		if (errno)
-			wait_message(5, "HAVE_MKTEMP %s: %s", filename, strerror(errno));
-#		endif /* DEBUG */
 #	endif /* HAVE_MKTEMP */
+		if (errno && (errno != ENOENT))
+			wait_message(5, "HAVE_MK(S)TEMP %s: %s", filename, strerror(errno));
 #endif /* HAVE_MKSTEMP */
 		}
 	if (fd == -1)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.