if (duration > 0)
{
struct timespec t = dtotimespec (duration);
- wait_reading_process_output (min (t.tv_sec, WAIT_READING_MAX),
- t.tv_nsec, 0, 0, Qnil, NULL, 0);
+ struct timespec tend = timespec_add (current_timespec (), t);
+
+ /* wait_reading_process_output returns as soon as it detects
+ output from any subprocess, so we wait in a loop until the
+ time expires. */
+ do {
+ wait_reading_process_output (min (t.tv_sec, WAIT_READING_MAX),
+ t.tv_nsec, 0, 0, Qnil, NULL, 0);
+ t = timespec_sub (tend, current_timespec ());
+ } while (timespec_sign (t) > 0);
}
return Qnil;
{
#ifdef HAVE_WINDOW_SYSTEM
if (! inhibit_window_system)
- fprintf (stderr, "Please set the environment variable DISPLAY or TERM (see `tset').\n");
+ fprintf (stderr, "Please set the environment variable DISPLAY or TERM (see 'tset').\n");
else
#endif /* HAVE_WINDOW_SYSTEM */
- fprintf (stderr, "Please set the environment variable TERM; see `tset'.\n");
+ fprintf (stderr, "Please set the environment variable TERM; see 'tset'.\n");
exit (1);
}
DEFVAR_LISP ("standard-display-table", Vstandard_display_table,
doc: /* Display table to use for buffers that specify none.
+It is also used for standard output and error streams.
See `buffer-display-table' for more information. */);
Vstandard_display_table = Qnil;