summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-12-06 15:05:37 +0100
committerGitHub <noreply@github.com>2016-12-06 15:05:37 +0100
commit57c4e78bccfb60b584259e8daa9e4025116fd28c (patch)
tree371001dde6abcca2c3b6433ad789bc54aac13043 /tests
parente53e7d9688547893e7de67f1dbc830bef5cac2df (diff)
parent95188edf6fe63ee3fe8341b1b5c2e7b92beb3415 (diff)
downloadNim-57c4e78bccfb60b584259e8daa9e4025116fd28c.tar.gz
Merge pull request #5088 from jfhg/posix_running
check waitpid() return value before setting exitStatus
Diffstat (limited to 'tests')
-rw-r--r--tests/osproc/texitcode.nim5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/osproc/texitcode.nim b/tests/osproc/texitcode.nim
index 1e83658c2..4eaab6da2 100644
--- a/tests/osproc/texitcode.nim
+++ b/tests/osproc/texitcode.nim
@@ -16,3 +16,8 @@ var running = true
 while running:
   running = running(p)
 doAssert(waitForExit(p) == QuitFailure)
+
+# make sure that first call to running() after process exit returns false
+p = startProcess(filename, dir)
+os.sleep(500)
+doAssert(not running(p))