unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Simon Josefsson <jas@extundo.com>
Subject: Re: sendmail.el bug or expected behavior?
Date: Mon, 26 Jan 2004 17:21:24 +0100	[thread overview]
Message-ID: <ilu3ca2k7ej.fsf@latte.josefsson.org> (raw)
In-Reply-To: 16405.8086.195634.248486@chiark.greenend.org.uk

I see much discussion, but few solutions.  Here is one idea (I can't
implement this now, but since I thought about the problem briefly, I
reckoned I should write it down somewhere):

The actual problem that users actually encounter seem to be when
`sendmail-program' points to a non-existing, a non-executable, or a
non-conforming (i.e., it rejects a command line parameter or exit
immediately because of invalid configuration file) application.

I think all of these cases can be detected, without negatively
affecting proper operation, by using start-process instead of
call-process with BUFFER=0.  The code would spawn the process, poll
the process for, e.g., 1 second, and if it is still running, continue.
If it returns with a fatal error code within 1 second, report that to
the user.  One potential problem would be that if sendmail is still
running when emacs is about to quit, then the process should not be
killed.  How can you achieve that?  There is
process-kill-without-query, but a process-forget-without-query would
be needed here.

E.g., replace

(setq foo (call-process ... 0 ...))

with

(setq foo (start-process ...))
(sit-for 1)
(unless (eq 0 (process-exit-status foo))
  (error "Invoking sendmail failed..."))

  reply	other threads:[~2004-01-26 16:21 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-20  6:14 sendmail.el bug or expected behavior? Rob Browning
2004-01-20 11:53 ` Simon Josefsson
2004-01-21  9:21 ` Richard Stallman
2004-01-21 18:28   ` Kevin Rodgers
2004-01-21 22:33   ` Simon Josefsson
2004-01-22 19:00     ` Richard Stallman
2004-01-22 19:09       ` Simon Josefsson
2004-01-23 12:29         ` Ian Jackson
2004-01-23 15:13           ` Jan D.
2004-01-26 11:20             ` Ian Jackson
2004-01-26 13:28               ` Jan D.
2004-01-26 13:40                 ` Ian Jackson
2004-01-26 13:50                   ` Jan D.
2004-01-26 14:10                     ` Ian Jackson
2004-01-26 14:25                       ` Jan D.
2004-01-26 14:29                         ` Ian Jackson
2004-01-26 14:35                           ` Jan D.
2004-01-26 14:42                             ` Ian Jackson
2004-01-27 18:49                   ` Richard Stallman
2004-01-27 21:03                     ` Stefan Monnier
2004-01-29 17:52                       ` Richard Stallman
2004-01-25 14:46           ` Richard Stallman
2004-01-23 18:25         ` Richard Stallman
2004-01-23 18:33           ` Eli Zaretskii
2004-01-23 18:38           ` Simon Josefsson
2004-01-26 14:09             ` Ian Jackson
2004-01-26 16:21               ` Simon Josefsson [this message]
2004-01-26 18:22                 ` Stefan Monnier
2004-01-26 19:26                   ` Simon Josefsson
2004-01-26 20:47                     ` Stefan Monnier
2004-01-27 18:50                 ` Richard Stallman
2004-01-30  4:27 ` Rob Browning
2004-01-30 14:45   ` Stefan Monnier
2004-01-30 14:46   ` Stefan Monnier
2004-01-30 14:46     ` David Kastrup
2004-01-30 16:14       ` Stefan Monnier
2004-01-31  7:51   ` Richard Stallman
2004-01-31 17:26     ` Rob Browning

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ilu3ca2k7ej.fsf@latte.josefsson.org \
    --to=jas@extundo.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).