From: Eli Zaretskii <eliz@gnu.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: emacs-devel@gnu.org
Subject: Truncated fatal error messages
Date: Sat, 22 Sep 2012 11:08:24 +0300 [thread overview]
Message-ID: <83mx0iwkcn.fsf@gnu.org> (raw)
This change:
@@ -2012,7 +2014,12 @@ shut_down_emacs (int sig, Lisp_Object st
{
reset_all_sys_modes ();
if (sig && sig != SIGTERM)
- fprintf (stderr, "Fatal error %d: %s", sig, strsignal (sig));
+ {
+ char buf[100];
+ int buflen = snprintf (buf, sizeof buf, "Fatal error %d: %s",
+ sig, strsignal (sig));
+ ignore_value (write (STDERR_FILENO, buf, buflen));
+ }
}
}
#else
arbitrarily limits the signal description due to the 99-char limit of
the buffer. Isn't it better to allocate the buffer (with alloca)
based on the length of the signal description?
next reply other threads:[~2012-09-22 8:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-22 8:08 Eli Zaretskii [this message]
2012-09-22 8:22 ` Truncated fatal error messages Andreas Schwab
2012-09-22 8:24 ` Paul Eggert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83mx0iwkcn.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=eggert@cs.ucla.edu \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.