As the Autoconf documentation says, "These days portable programs
[...] should not rely on `HAVE_RESTARTABLE_SYSCALLS', since nowadays
whether a system call is restartable is a dynamic issue, not a
configuration-time issue."
In other words, if we ever rely on HAVE_RESTARTABLE_SYSCALLS, we are
at the mercy of any code that Guile happens to be linked with, because
that code could install a signal handler without the SA_RESTART flag,
and then a Guile system call could unexpectedly return EINTR.
The readline part of this goes back to this problem report:
excellent example of the above paragraph. It was noted during the
discussion that undefining HAVE_RESTARTABLE_SYSCALLS would fix the
problem, but that solution wasn't adopted - I guess because Guile was
still using cooperative threads then (not pthreads) and so there was a
significant concern (whether founded or not) that not using
restartable syscalls (where available) could lead to a loss of
performance.
Now Guile's default mode of operation is with pthreads, where we
already don't assume that HAVE_RESTARTABLE_SYSCALLS is reliable, so
there is no possible further performance loss. And in any case we
really have no choice, if we want correct operation.
* configure.in (AC_SYS_RESTARTABLE_SYSCALLS): Removed.
* doc/ref/posix.texi (Signals): Remove statement that Guile always
sets SA_RESTART flag.
* guile-readline/configure.in (GUILE_SIGWINCH_SA_RESTART_CLEARED):
Remove this setting, together with its test code.
(HAVE_RL_PRE_INPUT_HOOK): Remove this setting and its code, as no
longer needed.
* guile-readline/readline.c (sigwinch_enable_restart): Removed.
(scm_init_readline): Remove setting of rl_pre_input_hook.
* libguile/_scm.h (SCM_SYSCALL): Remove the definition that relies on
HAVE_RESTARTABLE_SYSCALLS.
* libguile/scmsigs.c (scm_sigaction_for_thread): Don't always set the
SA_RESTART flag if available. Update docstring accordingly.
(scm_init_scmsigs): Remove code that sets SA_RESTART flag for all
signals.
When you use GDS to evaluate Scheme code from Emacs, you can now use
`C-u' to indicate that you want to single step through that code. See
`Evaluating Scheme Code' in the manual for more details.
* scheme-using.texi (Evaluating Scheme Code): Document use of
`C-u' prefix with evaluation commands.
* gds-scheme.el (gds-eval-region, gds-eval-expression)
(gds-eval-defun, gds-eval-last-sexp): Support `C-u' prefix,
meaning that user wants to single step through the code.
* gds-client.scm (handle-nondebug-protocol): Add support for
setting a trap on code that is about to be evaluated.
* debugger/commands.scm (evaluate, info-args, info-frame,
position, up, down): Improve/fix doc strings.
* Makefile.am (SUBDIRS): Add debugging.
(ice9_sources): Add gds-client.scm and gds-server.scm.
* scheme-debugging.texi: Remove lots of text that is now
duplicated (exactly) elsewhere, leaving only the `Tracing' node.
* guile.texi: Replace `Debugging Features' (scheme-debugging.texi)
by `Using Guile Interactively' and `Using Guile in Emacs'
(scheme-using.texi). Move the `Tracing' content of
scheme-debugging.texi to the Modules section.
* api-options.texi (Evaluator trap options): Move doc for
with-traps and debug-object? to here.
* api-modules.texi (Included Guile Modules): Change reference from
`Debugging Features' to `Tracing'.
* api-evaluation.texi (Evaluator Behaviour): Add reference to
`Evaluator trap options'.
* api-debug.texi (Examining the Stack): Minor improvements to
display-backtrace doc.
* api-debug.texi (Debug on Error): New text on how to catch errors
and the error stack.
* api-debug.texi (High Level Traps): New.
* api-debug.texi (Debugging): New intro text. New subsection
"Evaluation Model". Moved existing subsections "Capturing the
Stack or Innermost Stack Frame", "Examining the Stack", "Examining
Stack Frames", "Source Properties", "Decoding Memoized Source
Expressions" and "Starting a New Stack" under "Evaluation Model".
(Capturing the Stack or Innermost Stack Frame): Some new text, and
correction to doc for last-stack-frame.
(Debug on Error): Renamed from "Interactive Debugging".
* configure.in (AC_CONFIG_FILES): Add emacs/Makefile and
ice-9/debugging/Makefile.
* Makefile.am (SUBDIRS): Add emacs.
* scheme-using.texi: New (merged with modifications from CVS
HEAD).
* Makefile.am, gds-scheme.el, gds-server.el, gds.el: New (merged
with modifications from CVS HEAD).
* debugging/Makefile.am, debugging/example-fns.scm,
debugging/ice-9-debugger-extensions.scm, debugging/steps.scm,
debugging/trace.scm, debugging/traps.scm, debugging/trc.scm: New
(merged with modifications from CVS HEAD).
* gds-client.scm, gds-server.scm: New (merged with modifications
from CVS HEAD).
actually microsecond accurate, remove warning usleep not always
available (guile has own code for it now, it's not the system call).
Cross reference scm_std_sleep / scm_std_usleep.
(Signals): Merge getitimer and setitimer, describe what
each timer does, use @defvar to get them indexed, caution may not
actually be microsecond accurate.