help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: How to avoid having shell scripts which fail from killing Emacs shel


From: David Karr
Subject: Re: How to avoid having shell scripts which fail from killing Emacs shell?
Date: Mon, 22 Jun 2009 13:21:02 -0700 (PDT)
User-agent: G2/1.0

On Jun 19, 4:03 pm, David Karr <davidmichaelk...@gmail.com> wrote:
> I've often been annoyed by shell scripts which fail for particular
> reasons, at which point it causes my Emacs shell buffer to get killed,
> with "Process shell<2> finished".  I think it's possible I could code
> the script to make this not happen, but it would make more sense
> (especially when I didn't write the script) to configure Emacs or the
> Bash inside Emacs, so that it doesn't get killed when a script it's
> running fails.
>
> What are my options for mitigating this?

For a little more background, note that the script in question gathers
some simple parameters and then calls a Java class, which in my test
case, throws an exception because I'm giving it a file path that
doesn't exist (deliberately).

I note that even though the Java class throws an exception, it doesn't
cause the script to exit at that point. I tried putting an "echo"
right after the Java call, and it executes fine.  Right after that (as
it's the last line in the script), the script exits, and at my shell
prompt, I see "% exit" (where "%" is my PS1), and my shell buffer
terminates.


reply via email to

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