1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2026-01-03 00:53:41 +00:00

Fixed bug where interactive shell was redirecting stderr

This commit is contained in:
Bryan Roe
2020-02-04 17:15:51 -08:00
parent 32592bd622
commit afe0deacb2

View File

@@ -997,7 +997,7 @@ ILibProcessPipe_Process ILibProcessPipe_Manager_SpawnProcessEx4(ILibProcessPipe_
}
if (pid == 0)
{
if (spawnType != ILibProcessPipe_SpawnTypes_DETACHED)
if (spawnType != ILibProcessPipe_SpawnTypes_DETACHED && spawnType != ILibProcessPipe_SpawnTypes_TERM)
{
close(retVal->stdErr->mPipe_ReadEnd); //close read end of stderr pipe
dup2(retVal->stdErr->mPipe_WriteEnd, STDERR_FILENO);
@@ -1006,6 +1006,7 @@ ILibProcessPipe_Process ILibProcessPipe_Manager_SpawnProcessEx4(ILibProcessPipe_
if (spawnType == ILibProcessPipe_SpawnTypes_TERM)
{
putenv("TERM=xterm");
close(retVal->stdErr->mPipe_ReadEnd); //close read end of stderr pipe
}
else
{