GNU bug report logs -
#11586
mkstemp failure diagnostic lacks directory name
Previous Next
Reported by: Jim Meyering <jim <at> meyering.net>
Date: Wed, 30 May 2012 10:31:02 UTC
Severity: normal
Done: Chong Yidong <cyd <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 11586 in the body.
You can then email your comments to 11586 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#11586
; Package
emacs
.
(Wed, 30 May 2012 10:31:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Jim Meyering <jim <at> meyering.net>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 30 May 2012 10:31:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
In emacs I tried to filter a section of an input file
through a pipe and got this diagnostic:
byte-code: Failed to open temporary file: No such file or directory, emacsXXXXXX
Knowing it's due to mkstemp failure, most would suspect that
/tmp is missing. But I set TMPDIR to a different private directory
for each shell, and for me it means that the parent shell's
temporary directory had been removed. Oops.
It should be easy to work around simply by recreating that directory,
but the diagnostic doesn't include the directory name.
Sure, I was able to work around it by inspecting emacs's
view of $TMPDIR, but I shouldn't have had to do that.
With the tiny patch below, I now get a diagnostic like this:
byte-code: Failed to open temporary file: No such file or directory, /t/jt-toGrGn/emacs3gdoKc
From a389e755b74e048a34628b4f5ccad9f244e99cc3 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering <at> redhat.com>
Date: Wed, 30 May 2012 12:25:58 +0200
Subject: [PATCH] diagnose mkstemp failure with full file name
* callproc.c (Fcall_process_region): Diagnose mkstemp failure using
the full, expanded name, including the directory part, not just
the basename template.
---
src/ChangeLog | 6 ++++++
src/callproc.c | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/ChangeLog b/src/ChangeLog
index edf68a5..5d9e86e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2012-05-30 Jim Meyering <meyering <at> redhat.com>
+
+ * callproc.c (Fcall_process_region): Diagnose mkstemp failure using
+ the full, expanded name, including the directory part, not just
+ the basename template.
+
2012-05-30 Paul Eggert <eggert <at> cs.ucla.edu>
* alloc.c, lisp.h (make_pure_vector): Now static.
diff --git a/src/callproc.c b/src/callproc.c
index f7c9971..976d306 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -1015,7 +1015,7 @@ usage: (call-process-region START END PROGRAM &optional DELETE BUFFER DISPLAY &r
UNBLOCK_INPUT;
if (fd == -1)
report_file_error ("Failed to open temporary file",
- Fcons (Vtemp_file_name_pattern, Qnil));
+ Fcons (build_string (tempfile), Qnil));
else
close (fd);
}
--
1.7.10.2.605.gbefc5ed
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#11586
; Package
emacs
.
(Wed, 30 May 2012 14:23:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 11586 <at> debbugs.gnu.org (full text, mbox):
Jim Meyering <jim <at> meyering.net> writes:
> With the tiny patch below, I now get a diagnostic like this:
>
> byte-code: Failed to open temporary file: No such file or directory, /t/jt-toGrGn/emacs3gdoKc
>
> From a389e755b74e048a34628b4f5ccad9f244e99cc3 Mon Sep 17 00:00:00 2001
> From: Jim Meyering <meyering <at> redhat.com>
> Date: Wed, 30 May 2012 12:25:58 +0200
> Subject: [PATCH] diagnose mkstemp failure with full file name
Looks good; committed to trunk. Thanks.
bug closed, send any further explanations to
11586 <at> debbugs.gnu.org and Jim Meyering <jim <at> meyering.net>
Request was from
Chong Yidong <cyd <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Wed, 30 May 2012 14:23:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 28 Jun 2012 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 11 years and 305 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.