GNU bug report logs - #2428
23.0.90; sendmail-send-it not checking for call-process-region's return value properly

Previous Next

Package: emacs;

Reported by: tcr <at> freebits.de

Date: Sat, 21 Feb 2009 22:55:03 UTC

Severity: normal

Tags: patch

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (Emacs bug Tracking System)
To: Glenn Morris <rgm <at> gnu.org>
Subject: bug#2428: marked as done (23.0.90; sendmail-send-it not checking 
 for call-process-region's return value properly)
Date: Thu, 26 Feb 2009 04:00:08 +0000
[Message part 1 (text/plain, inline)]
Your message dated Wed, 25 Feb 2009 22:52:50 -0500
with message-id <y7skm1q2gd.fsf <at> fencepost.gnu.org>
and subject line Re: bug#2428: 23.0.90; sendmail-send-it not checking for call-process-region's return value properly
has caused the Emacs bug report #2428,
regarding 23.0.90; sendmail-send-it not checking for call-process-region's return value properly
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact help-debbugs <at> gnu.org
immediately.)


-- 
2428: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=2428
Emacs Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: tcr <at> freebits.de
To: emacs-pretest-bug <at> gnu.org
Subject: 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
`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



[Message part 3 (message/rfc822, inline)]
From: Glenn Morris <rgm <at> gnu.org>
To: 2428-done <at> debbugs.gnu.org
Subject: Re: bug#2428: 23.0.90; sendmail-send-it not checking for call-process-region's return value properly
Date: Wed, 25 Feb 2009 22:52:50 -0500
Thank you; installed.


This bug report was last modified 16 years and 140 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.