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

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

Re: run emacs in batch mode without a tty


From: Barry Margolin
Subject: Re: run emacs in batch mode without a tty
Date: Fri, 03 Jul 2015 18:55:26 -0400
User-agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)

In article <ac8061d2-9984-4ef1-9199-51e47d5c7439@googlegroups.com>,
 Sam Halliday <sam.halliday@gmail.com> wrote:

> Aha! It would appear that when emacs is started in -batch mode then the 
> program exits when it runs through the initial script.
> 
> But my tests are starting up a process, attaching a sentinel and then 
> reacting to some triggers in that file. Under non-batch mode, emacs stays 
> open until I call `kill-emacs`... but *now* it's dying too early.
> 
> So my question then becomes: is there a way to stop emacs -batch from 
> terminating when it reaches the end of the script? i.e. require an explicit 
> kill-emacs call.

I don't think so.

In normal Emacs, when the script finishes, it goes to the main input 
loop, which displays the buffer and processes terminal input. That's why 
it needs a terminal.

In batch mode, there's no terminal or redisplay, so there's no main 
input loop. It just runs the script and exits.

Running another process isn't compatible with this mode, because 
processing the process output is also part of that main input loop.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


reply via email to

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