GNU bug report logs -
#12908
24.3.50; file `emacs_backtrace.txt'?
Previous Next
Reported by: "Drew Adams" <drew.adams <at> oracle.com>
Date: Fri, 16 Nov 2012 18:32:01 UTC
Severity: normal
Found in version 24.3.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> Date: Sat, 17 Nov 2012 13:25:17 -0800
> From: Paul Eggert <eggert <at> cs.ucla.edu>
> CC: 12908 <at> debbugs.gnu.org
>
> >> Perhaps it would be better for Emacs, on Microsoft Windows, to
> >> redirect stderr to a file, so that the information does not get
> >> lost.
> >
> > It's not easy to do that
>
> Can Emacs use freopen?
That's not the problem. The problem is that stderr is used when Emacs
is run in non-interactive mode, and should not be touched then. The
problem is in detecting when stderr is closed or an invalid handle to
begin with, and do the redirection only then. In all my readings and
tests, I was unable to find a reliable, let alone documented, way of
determining that. I don't even know if the "invalid handle" (which is
a pointer on Windows) is NULL or an INVALID_HANDLE_VALUE.
> For example, the following code would do the job on a POSIX
> platform: if stderr is closed, it redirects it to emacs-stderr.txt
> in the current directory, if possible. Would this sort of thing
> work on Microsoft platform?
It will surely break -batch. And guess what happens with this
redirection when Emacs has its stderr closed or invalid in the first
place.
This bug report was last modified 12 years and 241 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.