changeset 21423:f866f7cadda2

(Fmake_temp_name): Detect error return from mktemp.
author Karl Heuer <kwzh@gnu.org>
date Wed, 08 Apr 1998 07:08:28 +0000
parents b49e191032c7
children fbfd26142e76
files src/fileio.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/fileio.c	Wed Apr 08 07:05:35 1998 +0000
+++ b/src/fileio.c	Wed Apr 08 07:08:28 1998 +0000
@@ -797,6 +797,7 @@
   (prefix)
      Lisp_Object prefix;
 {
+  char *temp;
   Lisp_Object val;
 #ifdef MSDOS
   /* Don't use too many characters of the restricted 8+3 DOS
@@ -805,7 +806,10 @@
 #else
   val = concat2 (prefix, build_string ("XXXXXX"));
 #endif
-  mktemp (XSTRING (val)->data);
+  temp = mktemp (XSTRING (val)->data);
+  if (! temp)
+    error ("No temporary file names based on %s are available",
+	   XSTRING (prefix)->data);
 #ifdef DOS_NT
   CORRECT_DIR_SEPS (XSTRING (val)->data);
 #endif