Initialize master terminal of processes run inside a pseudo-terminal before forking.
[INTEPRETER] * NEW: Initialize master terminal of processes run inside a pseudo-terminal before forking.
This commit is contained in:
parent
c7d4a97125
commit
359471cc30
1 changed files with 12 additions and 12 deletions
|
@ -603,6 +603,18 @@ static void run_process(CPROCESS *process, int mode, void *cmd, CARRAY *env)
|
|||
#ifdef DEBUG_ME
|
||||
fprintf(stderr, "run_process: slave = %s\n", slave);
|
||||
#endif
|
||||
|
||||
if (mode & PM_TERM)
|
||||
{
|
||||
if (tcgetattr(fd_master, &termios_master))
|
||||
goto __ABORT_ERRNO;
|
||||
|
||||
cfmakeraw(&termios_master);
|
||||
//termios_master.c_lflag &= ~ECHO;
|
||||
|
||||
if (tcsetattr(fd_master, TCSANOW, &termios_master))
|
||||
goto __ABORT_ERRNO;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -653,18 +665,6 @@ static void run_process(CPROCESS *process, int mode, void *cmd, CARRAY *env)
|
|||
fprintf(stderr, "fork: pid = %d\n", pid);
|
||||
#endif
|
||||
|
||||
if (mode & PM_TERM)
|
||||
{
|
||||
if (tcgetattr(fd_master, &termios_master))
|
||||
goto __ABORT_ERRNO;
|
||||
|
||||
cfmakeraw(&termios_master);
|
||||
//termios_master.c_lflag &= ~ECHO;
|
||||
|
||||
if (tcsetattr(fd_master, TCSANOW, &termios_master))
|
||||
goto __ABORT_ERRNO;
|
||||
}
|
||||
|
||||
if (mode & PM_WRITE)
|
||||
{
|
||||
if (mode & PM_TERM)
|
||||
|
|
Loading…
Reference in a new issue