diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2014-02-27 23:39:16 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2014-02-27 23:39:16 +0100 |
commit | 25f6e0c681f49e3798d1cffcd426ea0f1f014ff0 (patch) | |
tree | 6303e3083988482837986d41745bb4d1fd5f4e85 /lib | |
parent | 393706498e516057def907ee45985b1250df5b77 (diff) | |
parent | f4371bfef85e5a1340de803d90ec176291094d0e (diff) | |
download | Nim-25f6e0c681f49e3798d1cffcd426ea0f1f014ff0.tar.gz |
Merge pull request #963 from zielmicha/wait-for-exit-doc
osproc: add warning about using waitForExit without poParentStreams
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pure/osproc.nim | 3 |
1 files changed, 3 insertions, 0 deletions
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 |