GNU bug report logs -
#6963
Return an exit status to emacsclient
Previous Next
Reported by: Arne Babenhauserheide <arne_bab <at> web.de>
Date: Wed, 1 Sep 2010 10:16:01 UTC
Severity: wishlist
Found in version 23.2
Done: Chong Yidong <cyd <at> stupidchicken.com>
Bug is archived. No further changes may be made.
Full log
Message #14 received at 6963 <at> debbugs.gnu.org (full text, mbox):
On Wed, Sep 29, 2010 at 08:09, Wolfgang Schnerring <wosc <at> wosc.de> wrote:
> But that it does not signal error
> situations via its exit status
It does in most cases.
> since emacsclient returns 0 no matter what.
That's not accurate. When emacsclient detects a problem with itself
(missing server file, error opening socket, etc.) it returns
EXIT_FAILURE (1). What it currently does not do, however, is returning
EXIT_FAILURE for errors passed back from Emacs.
> I've attached a patch that makes emacsclient exit with nonzero status
> when it receives an error message from Emacs -- it already *prints*
> "*ERROR*" in these cases, so I feel this makes a lot of sense.
Yes, it makes sense, because after -error the client's process is
deleted, so emacsclient exits immediately.
So, two questions remain:
- should this be considered a bug, and installed on emacs-23, or a new
feature, for the trunk?
- should emacsclient return 1 for these new errors, or a new error
code (2) to allow distinguishing them?
Juanma
This bug report was last modified 14 years and 276 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.