[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs exit (return) code?

From: Eli Zaretskii
Subject: Re: Emacs exit (return) code?
Date: Sat, 12 Oct 2002 10:02:19 +0300

> From: (J.D. Baldwin)
> Newsgroups:
> Date: Thu, 10 Oct 2002 19:09:14 +0000 (UTC)
> I observe the same behavior with the sudo
> utility "visudo" (version 1.6.3p7 running on either Solaris 7 or 8).
> If I edit a file and never hit ^G, my changes are accepted.  If I ever
> hit ^G during my session, I get this message:
>     visudo: Editor (/opt/local/bin/emacs) failed with exit status 53248, \
>                  /etc/sudoers unchanged.
> In that case, my changes are rejected without giving me a chance to
> recover them.  (Yes, I know this is brain damage on the part of sudo,
> but I can't fix that just now.)
> So my questions are:
> 1. What causes this? and

Emacs sets things up so that ^G generates a signal, similar to ^C in
other programs.  An interrupted program usually returns the signal in
its exit status.  I think this is what you see.

> 2. Is there a way to suppress this behavior?

Write a short shell script that invokes Emacs and then always returns
a zero status.  Then tell those programs to run the script instead of
Emacs as your editor.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]