From 8cb6c18ca6e415836329b604368c0233b87e490e Mon Sep 17 00:00:00 2001 From: Tanner Nelson Date: Mon, 5 Sep 2016 10:55:21 -0400 Subject: [PATCH] terminal fix --- Sources/Console/Terminal/Terminal.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sources/Console/Terminal/Terminal.swift b/Sources/Console/Terminal/Terminal.swift index c64af645..a3016c8c 100644 --- a/Sources/Console/Terminal/Terminal.swift +++ b/Sources/Console/Terminal/Terminal.swift @@ -133,6 +133,8 @@ public class Terminal: ConsoleProtocol { _pids.append(pid) let result = posix_spawnp(pid, argv[0], &fileActions, nil, argv + [nil], env + [nil]) + waitpid(pid.pointee, nil, 0) + if result == ENOENT { throw ConsoleError.fileOrDirectoryNotFound } else if result != 0 {