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: Eli Zaretskii
Subject: Re: run emacs in batch mode without a tty
Date: Sat, 04 Jul 2015 10:42:53 +0300

> Date: Fri, 3 Jul 2015 15:01:18 -0700 (PDT)
> From: Sam Halliday <sam.halliday@gmail.com>
> 
> The docs say:
> 
>    "In batch mode (see Batch Mode), sit-for cannot be interrupted, even by 
> input from the standard input descriptor. It is thus equivalent to sleep-for, 
> which is described below."
> 
> but I am pretty sure (sit-for seconds) *IS* interrupted by something.

It is interrupted by input from your subprocess.

> So... this
> 
>     (while t
>       (sleep-for 30))
> 
> Stops the script from ending until I'm ready to explicitly end it.

You need to wait more intelligently, so that the wait never ends until
you've received all the stuff from the subprocess, or until the
subprocess dies, or whatever else is pertinent for your application.

The fact that sleep-for (NOT sit-for!) is interrupted by subprocess
input is arguably a bug, which was recently fixed in the development
version of Emacs.



reply via email to

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