Running mc from mc


Adam asked me in private if it's possible to disable running one mc from
another.  I have committed a patch that implements this check.

The patch prevents running two copies of mc with subshells in the same
login session.  It is still possible to run mcview or mcedit from mc
because they don't need the subshell.  It's also possible to run xterm
from mc and run mc in it, because it would be in a different session.

It's still possible to run su from mc and run mc in it.  It's not a bug,
although one could make a big mess by using Ctrl-O.

The session id is set in the environment variable MC_SID.  It can be used
as an indicator that we are running from mc, directly or indirectly.

Pavel Roskin

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]