From f4371bfef85e5a1340de803d90ec176291094d0e Mon Sep 17 00:00:00 2001 From: Michał Zieliński Date: Thu, 27 Feb 2014 19:48:53 +0100 Subject: osproc: add warning about using waitForExit without poParentStreams --- lib/pure/osproc.nim | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib') diff --git a/lib/pure/osproc.nim b/lib/pure/osproc.nim index 2a685f3fb..582b3c960 100644 --- a/lib/pure/osproc.nim +++ b/lib/pure/osproc.nim @@ -168,6 +168,9 @@ proc processID*(p: PProcess): int {.rtl, extern: "nosp$1".} = proc waitForExit*(p: PProcess, timeout: int = -1): int {.rtl, extern: "nosp$1", tags: [].} ## waits for the process to finish and returns `p`'s error code. + ## + ## **Warning**: Be careful when using waitForExit for processes created without + ## poParentStreams because they may fill output buffers, causing deadlock. proc peekExitCode*(p: PProcess): int {.tags: [].} ## return -1 if the process is still running. Otherwise the process' exit code -- cgit 1.4.1-2-gfad0