all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Truncated fatal error messages
@ 2012-09-22  8:08 Eli Zaretskii
  2012-09-22  8:22 ` Andreas Schwab
  2012-09-22  8:24 ` Paul Eggert
  0 siblings, 2 replies; 3+ messages in thread
From: Eli Zaretskii @ 2012-09-22  8:08 UTC (permalink / raw)
  To: Paul Eggert; +Cc: emacs-devel

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?



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-09-22  8:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-22  8:08 Truncated fatal error messages Eli Zaretskii
2012-09-22  8:22 ` Andreas Schwab
2012-09-22  8:24 ` Paul Eggert

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.