From 76950925a36c7f4dbccad52ff7ef5b489e3ac222 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Wed, 26 Oct 2022 17:03:46 -0700 Subject: emacsclient wrapper: use gdb-wait-for-pending when detaching gdbmacs --- bin/emacsclient | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'bin/emacsclient') diff --git a/bin/emacsclient b/bin/emacsclient index ed1c2215..2b818e04 100755 --- a/bin/emacsclient +++ b/bin/emacsclient @@ -125,8 +125,12 @@ if [ -z "$daemon_name" ] && $devel_running && $want_installed; then # gdb so that `spw/gdbmacs-attach' doesn't look at `gdb-inferior-status'. [ -n "${gdbmacs:=$(get_listener ${socket_dir}gdbmacs)}" ] \ && "$installed_emacsclient" -sgdbmacs \ - --eval '(gud-basic-call "detach")' \ - --eval '(gud-basic-call "quit")' + --eval '(gdb-wait-for-pending + (lambda () + (gud-basic-call "detach") + (gdb-wait-for-pending + (lambda () + (gud-basic-call "quit")))))' wait $inotifywait devel_running=false -- cgit v1.2.3