diff options
author | Araq <rumpf_a@web.de> | 2011-09-24 20:22:53 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2011-09-24 20:22:53 +0200 |
commit | 0f37d0e1f2aeee466b3c6179886963354eaa6222 (patch) | |
tree | 51ae4183dabd454877d7570cafb7f72dcf519011 /lib/pure/osproc.nim | |
parent | 485c371942cbbb1f9a10c64b6fcc699e59511460 (diff) | |
download | Nim-0f37d0e1f2aeee466b3c6179886963354eaa6222.tar.gz |
sockets.recv optimizations; stdlib now supports taint mode
Diffstat (limited to 'lib/pure/osproc.nim')
-rwxr-xr-x | lib/pure/osproc.nim | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/pure/osproc.nim b/lib/pure/osproc.nim index bf5dc7970..1b7d41908 100755 --- a/lib/pure/osproc.nim +++ b/lib/pure/osproc.nim @@ -41,7 +41,7 @@ type proc execProcess*(command: string, options: set[TProcessOption] = {poStdErrToStdOut, - poUseShell}): string {. + poUseShell}): TaintedString {. rtl, extern: "nosp$1".} ## A convenience procedure that executes ``command`` with ``startProcess`` ## and returns its output as a string. @@ -203,13 +203,13 @@ proc select*(readfds: var seq[PProcess], timeout = 500): int when not defined(useNimRtl): proc execProcess(command: string, options: set[TProcessOption] = {poStdErrToStdOut, - poUseShell}): string = + poUseShell}): TaintedString = var p = startProcessAux(command, options=options) var outp = outputStream(p) - result = "" + result = TaintedString"" while running(p) or not outp.atEnd(outp): - result.add(outp.readLine()) - result.add("\n") + result.string.add(outp.readLine().string) + result.string.add("\n") outp.close(outp) close(p) |