From afe0deacb2d7dd15fc529011dc7cdf9b8a7db759 Mon Sep 17 00:00:00 2001 From: Bryan Roe Date: Tue, 4 Feb 2020 17:15:51 -0800 Subject: [PATCH] Fixed bug where interactive shell was redirecting stderr --- microstack/ILibProcessPipe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/microstack/ILibProcessPipe.c b/microstack/ILibProcessPipe.c index e9b894f..afe9a12 100644 --- a/microstack/ILibProcessPipe.c +++ b/microstack/ILibProcessPipe.c @@ -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 {