The general case:
Simply put, given that I start two processes (A
and B
) with, e.g., async-start-process
, what is best way of killing B
if A
terminates?
My specific usecase:
I'm debugging embedded software on an external chip and launch a GDB server that interfaces the chip and GDB like this (gdb ... "-ex \"target remote ...\"")
and I want to kill the GDB server process when GDB quits.
Additional edit:
It would be nice to be able to kill the GDB server when quitting GDB, though. I.e., the opposite way around: hitting q
in the GDB buffer would shut everything down.
I tried searching through the Emacs/elisp documentation, but I'm pretty new to elisp :) Any suggestions?