summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/emacsclient6
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/emacsclient b/bin/emacsclient
index 770ef66a..fe08427d 100755
--- a/bin/emacsclient
+++ b/bin/emacsclient
@@ -73,7 +73,10 @@ if [ -n "$listener" ]; then
esac
fi
+# ---- Special case for primary session that's always under gdb
if [ -z "$daemon_name" ] && $devel_running && $want_installed; then
+ inotifywait -qq -e delete "$socket" &
+ inotifywait=$!
kill "$listener"
# Detach gdb so that Emacs can handle the SIGTERM.
@@ -83,9 +86,10 @@ if [ -z "$daemon_name" ] && $devel_running && $want_installed; then
&& emacsclient -sgdbmacs --eval '(gud-basic-call "detach")' \
--eval '(gud-basic-call "quit")'
- [ -e "$socket" ] && inotifywait -qqt 2 -e delete "$socket"
+ wait $inotifywait
devel_running=false
fi
+# ---- End special case for primary session that's always under gdb
[ -z "$listener" ] && ! $may_start && exit 0