understand if a shell process is in background?
I keep an instance of mutt idling on a terminal, if it is on index or pager I want it to be able to receive a macro from an external process (AutoKey or xdotool etc..), but the external program need to check mutt isn't running some sub process (emacs, shell...), how to check?
It is Linux, so if some `/proc/$pid/*` could work would be fine.
You could do this to emit child processes of mutt: