diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2022-10-21 09:45:47 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2022-10-29 21:47:37 -0700 |
commit | 7bae01d026509830800f2cacdb756462823a011d (patch) | |
tree | 68e7c7de99623638f7af235cf917c12c5097ee35 /bin/emacsclient | |
parent | 544f3e9fd18894f0f3b9628011591f272c3ec271 (diff) | |
download | dotfiles-7bae01d026509830800f2cacdb756462823a011d.tar.gz |
emacsclient wrapper: start inotifywait(1) earlier
Diffstat (limited to 'bin/emacsclient')
-rwxr-xr-x | bin/emacsclient | 6 |
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 |