diff options
author | Fernando Carrijo <fcarrijo@yahoo.com.br> | 2010-08-14 06:57:43 -0300 |
---|---|---|
committer | Fernando Carrijo <fcarrijo@yahoo.com.br> | 2010-08-14 06:57:43 -0300 |
commit | 072a60b1aaf91de5ebdbd507bc78978876dfe178 (patch) | |
tree | 3151b9beee937d42cd48f77ba182e645005ff8a1 | |
parent | 6b79e8974bd70e5b2d20cbaffc704299a32a9b46 (diff) |
os: inputthread: Explicitely close the pipes after the input thread is cancelled
-rw-r--r-- | os/inputthread.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/os/inputthread.c b/os/inputthread.c index a7b45b39d..be7bff811 100644 --- a/os/inputthread.c +++ b/os/inputthread.c @@ -164,6 +164,11 @@ CloseInputThread (void) pthread_join(InputThread, NULL); RemoveGeneralSocket(InputThreadReadPipe); + close(InputThreadWritePipe); + close(InputThreadReadPipe); + InputThreadReadPipe = -1; + InputThreadWritePipe = -1; + FD_ZERO(&InputThreadFd); NumDevicesThreaded = 0; } |