Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37754668
en ru br
ALT Linux repos
S:4.8.30-alt3
5.0: 4.6.2-alt11.pre1
4.1: 4.6.2-alt7.pre1
4.0: 4.6.1r-alt9
3.0: 4.6.1r-alt3

Group :: File tools
RPM: mc

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: mc-4.8.20-alt-forceexec.patch
Download


diff -Nur mc-4.8.20.old/po/ru.po mc-4.8.20/po/ru.po
--- mc-4.8.20.old/po/ru.po	2017-12-11 09:30:02.279019204 +0400
+++ mc-4.8.20/po/ru.po	2017-12-11 10:28:52.633788885 +0400
@@ -680,6 +680,9 @@
 msgid "Disables subshell support"
 msgstr "Отключить поддержку встроенной командной оболочки"
 
+msgid "Force subshell execution"
+msgstr "Принудительное выполнение во встроенной командной оболочке"
+
 msgid "Log ftp dialog to specified file"
 msgstr "Записывать диалог с FTP в заданный файл"
 
diff -Nur mc-4.8.20.old/src/args.c mc-4.8.20/src/args.c
--- mc-4.8.20.old/src/args.c	2017-12-11 09:30:02.297019051 +0400
+++ mc-4.8.20/src/args.c	2017-12-11 10:28:52.635788868 +0400
@@ -43,6 +43,7 @@
 #include "src/args.h"
 
 /*** external variables **************************************************************************/
+extern int force_subshell_execution;
 
 /*** global variables ****************************************************************************/
 
@@ -154,6 +155,13 @@
      N_("Disables subshell support"),
      NULL
     },
+
+    {
+     "forceexec", 'r', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE,
+     &force_subshell_execution,
+     N_("Force subshell execution"),
+     NULL
+    },
 #endif
 
     /* debug options */
diff -Nur mc-4.8.20.old/src/execute.c mc-4.8.20/src/execute.c
--- mc-4.8.20.old/src/execute.c	2017-12-11 09:30:02.301019017 +0400
+++ mc-4.8.20/src/execute.c	2017-12-11 10:31:22.850491471 +0400
@@ -75,6 +75,8 @@
 
 /* --------------------------------------------------------------------------------------------- */
 
+int force_subshell_execution = 0;
+
 static void
 edition_post_exec (void)
 {
@@ -431,7 +433,7 @@
 #ifdef ENABLE_SUBSHELL
     if (mc_global.tty.use_subshell)
     {
-        if (subshell_state == INACTIVE)
+        if (subshell_state == INACTIVE || force_subshell_execution)
             do_execute (mc_global.shell->path, cmd ? cmd : command, flags | EXECUTE_AS_SHELL);
         else
             message (D_ERROR, MSG_ERROR, "%s", _("The shell is already running a command"));
diff -Nur mc-4.8.20.old/src/execute.h mc-4.8.20/src/execute.h
--- mc-4.8.20.old/src/execute.h	2016-03-21 15:56:31.000000000 +0400
+++ mc-4.8.20/src/execute.h	2017-12-11 10:28:52.638788842 +0400
@@ -28,6 +28,9 @@
 
 /*** declarations of public functions ************************************************************/
 
+/* If true message "The shell is already running a command" never */
+extern int force_subshell_execution;
+
 /* Execute functions that use the shell to execute */
 void shell_execute (const char *command, int flags);
 
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin