all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: tcr@freebits.de
To: emacs-pretest-bug@gnu.org
Subject: bug#2428: 23.0.90; sendmail-send-it not checking for call-process-region's return value properly
Date: Sat, 21 Feb 2009 23:45:02 +0100	[thread overview]
Message-ID: <87wsbjs93l.fsf@freebits.de> (raw)


`sendmail-send-it' invokes `call-process-region' but doesn't check for
the case when the latter returns a string to indicate an error value.

This results in a backtrace like

  Debugger entered--Lisp error: (error "Format specifier doesn't match argument type")
    format("Sending...failed with exit value %d" "Broken pipe")
    apply(format ("Sending...failed with exit value %d" "Broken pipe"))
    error("Sending...failed with exit value %d" "Broken pipe")
    sendmail-send-it()
    mail-send()
    mail-send-and-exit(nil)
    call-interactively(mail-send-and-exit nil nil)

The following patch fixes that

--- lisp/mail/sendmail.el	2009-02-07 04:02:39.000000000 +0100
+++ lisp/mail/sendmail.el-hacked	2009-02-21 23:37:44.000000000 +0100
@@ -1168,8 +1168,13 @@
 			      )
 		      )
 		     (exit-value (apply 'call-process-region args)))
-		(or (null exit-value) (eq 0 exit-value)
-		    (error "Sending...failed with exit value %d" exit-value)))
+		(cond ((or (null exit-value) (eq 0 exit-value)))
+                      ((numberp exit-value)
+                       (error "Sending...failed with exit value %d" exit-value))
+                      ((stringp exit-value)
+                       (error "Sending...terminated by signal: %s" exit-value))
+                      (t 
+                       (error "SENDMAIL-SEND-IT -- fall through: %S" exit-value))))
 	    (or fcc-was-found
 		(error "No recipients")))
 	  (if mail-interactive


In GNU Emacs 23.0.90.4 (i686-pc-linux-gnu, GTK+ Version 2.12.9)
 of 2009-02-21 on thaleron
Windowing system distributor `The X.Org Foundation', version 11.0.10400090
configured using `configure  '--prefix=/home/tcr/software/emacs-cvs' '--with-x-toolkit=gtk' '--without-gpm' '--with-x' '--without-xpm' '--enable-asserts' 'CFLAGS=-g''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t

Major mode: Group

Minor modes in effect:
  gnus-topic-mode: t
  gnus-undo-mode: t
  diff-auto-refine-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
L S-SPC T R H O U G H . <left> <left> <left> <left> 
<left> <left> <left> <left> <left> <left> <left> <left> 
<left> M-l M-l <left> <left> <left> <left> <left> <backspace> 
<right> r <right> <right> <right> <right> <right> <right> 
<right> <left> <left> <backspace> : SPC % S <right> 
<right> <left> SPC e x i t - v a l u e <switch-frame> 
<down-mouse-5> <mouse-5> <double-down-mouse-5> <double-mouse-5> 
<triple-down-mouse-5> <triple-mouse-5> <down-mouse-4> 
<mouse-4> <down-mouse-1> <mouse-1> <double-down-mouse-1> 
<double-mouse-1> u <help-echo> <switch-frame> <down-mouse-1> 
<mouse-movement> <mouse-1> C-M-k <up> ( o r C-) C-M-f 
SPC C-y <down> C-a C-k C-k C-x C-s C-M-x <switch-frame> 
<down-mouse-1> <mouse-movement> <mouse-1> C-x b C-g 
C-x C-b C-x o <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <return> q <up> <up> <up> <up> 
<down> C-x o M-x r e p o r t - e m <tab> <return> f 
o o <return> y <up> <up> <up> <up> <right> <right> 
<right> <right> C-k t c r @ f r e e b i t s . d e C-c 
C-c y e s <return> <switch-frame> C-x C-s <switch-frame> 
<down-mouse-1> <mouse-movement> <mouse-1> M-x g n u 
s <return> y <help-echo> <switch-frame> <down-mouse-1> 
<mouse-1> C-x C-f <help-echo> <switch-frame> <down-mouse-1> 
<mouse-1> M-x <switch-frame> <down-mouse-1> <mouse-movement> 
<mouse-1> M-x r e p o r t - e m a c s - b u g s <return> 
<M-backspace> b <tab> <return> F o o <return> y <up> 
<up> <up> <right> <right> <right> <up> <right> C-k 
t c r @ f r e e b i t s d e <backspace> <backspace> 
. d e C-c C-c y e s <return> <left> <left> <left> <left> 
<left> <left> <left> <left> <left> <left> <left> <help-echo> 
<down> <down> <down> <down> <down> <down> C-a C-SPC 
M-> C-w C-y C-x b <return> M-x r e p r <backspace> 
o r t <tab> <return>

Recent messages:
gnus-all-windows-visible-p: Invalid buffer type: if
Auto-saving...
ffap-read-file-or-url: Command attempted to use minibuffer while in minibuffer
Unsent message being composed; erase it? (y or n) 
Auto save file for draft message exists; consider M-x mail-recover
Sending...
smtpmail-open-stream: Autoloading failed to define function starttls-any-program-available
Auto-saving...done
Mark set [2 times]
Auto-saving...

-- 
Diese Nachricht wurde auf Viren und andere gefaerliche Inhalte untersucht
und ist - aktuelle Virenscanner vorausgesetzt - sauber.
Freebits E-Mail Virus Scanner







             reply	other threads:[~2009-02-21 22:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <y7skm1q2gd.fsf@fencepost.gnu.org>
2009-02-21 22:45 ` tcr [this message]
2009-02-25  4:00   ` bug#2428: 23.0.90; sendmail-send-it not checking for call-process-region's return value properly Glenn Morris
2009-02-25 11:08     ` Tobias C. Rittweiler
2009-02-26  4:00   ` bug#2428: marked as done (23.0.90; sendmail-send-it not checking for call-process-region's return value properly) Emacs bug Tracking System

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=87wsbjs93l.fsf@freebits.de \
    --to=tcr@freebits.de \
    --cc=2428@emacsbugs.donarmstrong.com \
    --cc=emacs-pretest-bug@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.