Ticket #3927: mc_common.c.patch
File mc_common.c.patch, 1.2 KB (added by jax, 6 years ago) |
---|
-
src/subshell/common.c
a b 88 88 #include "subshell.h" 89 89 #include "internal.h" 90 90 91 #ifdef HAVE_OPENPTY 92 #include <pty.h> 93 #endif 94 91 95 /*** global variables ****************************************************************************/ 92 96 93 97 /* State of the subshell: … … 1021 1025 1022 1026 /* FIXME: We may need to open a fresh pty each time on SVR4 */ 1023 1027 1028 #ifdef HAVE_OPENPTY //TODO: clean this up. Should have a check for HAVE_OPENPTY or something 1029 if (openpty(&mc_global.tty.subshell_pty, &subshell_pty_slave, NULL, NULL, NULL)) 1030 { 1031 fprintf (stderr, "Cannot open master and slave sides of pty: %s\n", unix_error_string (errno)); 1032 mc_global.tty.use_subshell = FALSE; 1033 return; 1034 } 1035 #else 1036 1024 1037 mc_global.tty.subshell_pty = pty_open_master (pty_name); 1025 1038 if (mc_global.tty.subshell_pty == -1) 1026 1039 { … … 1036 1049 mc_global.tty.use_subshell = FALSE; 1037 1050 return; 1038 1051 } 1039 1052 #endif /* #ifdef PASE */ 1040 1053 /* Create a pipe for receiving the subshell's CWD */ 1041 1054 1042 1055 if (mc_global.shell->type == SHELL_TCSH)