From 4339f895d6f50a7657cc71df64e5bcb613074a47 Mon Sep 17 00:00:00 2001 From: Wesley Kerfoot Date: Sun, 29 Mar 2020 19:45:50 -0400 Subject: [PATCH] actually close exited subprocess handles --- src/nimwin.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nimwin.nim b/src/nimwin.nim index 8f74240..fa8d1ef 100644 --- a/src/nimwin.nim +++ b/src/nimwin.nim @@ -139,6 +139,7 @@ when isMainModule: let processExited = processChan.tryRecv() if processExited.dataAvailable: + openProcesses[processExited.msg].close openProcesses.del(processExited.msg) # TODO refactor using XPending or XCB? @@ -149,7 +150,6 @@ when isMainModule: # For spawning a terminal we also want events for the root window if (ev.theType == KeyPress): - echo "Executing xterm" let p = startTerminal() openProcesses[p.processID] = p spawn handleProcess(p)