Programatically call exit_subshell outside of mc #3941
Labels
area: core
Issues not related to a specific subsystem
prio: low
Minor problem or easily worked around
ver: 4.8.19
Reproducible in version 4.8.19
Milestone
Important
This issue was migrated from Trac:
z0rc
(z0rc3r@….com)I'm looking for ways to gracefully handle attempts of launching second copy of MC when already running in MC subshell.
Initially I was planning to have a shell function in place of mc, it will check whether mc is already running at current tty, get its PID and perform function call that is currently bound to Ctrl+O in mc. Unfortunately as I was able to understand, right now it's possible to exit subshell only via this keybind, and there is no way to call it outside of mc without user input.
My proposal is to bind exit_subshell() to some signal, that isn't used for other purposes within MC, for example SIGUSR2.
Additionally, maybe mc itself would be able to handle situation, when it's launched from subshell of another mc. So instead of issuing a warning, it would call exit_subshell of parent mc instance and quit silently.
The text was updated successfully, but these errors were encountered: