From 5784e436624ac4f5118ee33c44b7705538e04020 Mon Sep 17 00:00:00 2001 From: Dominik Picheta Date: Thu, 21 Jul 2016 16:14:00 +0100 Subject: [PATCH] Add warning to `osproc.close` --- lib/pure/osproc.nim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/pure/osproc.nim b/lib/pure/osproc.nim index d58335e822..7378520e3c 100644 --- a/lib/pure/osproc.nim +++ b/lib/pure/osproc.nim @@ -175,7 +175,11 @@ proc startCmd*(command: string, options: set[ProcessOption] = { result = startProcess(command=command, options=options + {poEvalCommand}) proc close*(p: Process) {.rtl, extern: "nosp$1", tags: [].} - ## When the process has finished executing, cleanup related handles + ## When the process has finished executing, cleanup related handles. + ## + ## **Warning:** If the process has not finished executing, this will forcibly + ## terminate the process. Doing so may result in zombie processes and + ## `pty leaks `_. proc suspend*(p: Process) {.rtl, extern: "nosp$1", tags: [].} ## Suspends the process `p`.