mnexec already puts the shell into its own process group. Killing the entire process group cleans up after any background processes the user left running.
mnexec already puts the shell into its own process group. Killing the entire process group cleans up after any background processes the user left running.