summaryrefslogtreecommitdiff
path: root/bin/emacsclient
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-10-21 09:45:47 -0700
committerSean Whitton <spwhitton@spwhitton.name>2022-10-29 21:47:37 -0700
commit7bae01d026509830800f2cacdb756462823a011d (patch)
tree68e7c7de99623638f7af235cf917c12c5097ee35 /bin/emacsclient
parent544f3e9fd18894f0f3b9628011591f272c3ec271 (diff)
downloaddotfiles-7bae01d026509830800f2cacdb756462823a011d.tar.gz
emacsclient wrapper: start inotifywait(1) earlier
Diffstat (limited to 'bin/emacsclient')
-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