From 267a009e035f96fda8c0b9f844bd6cae5fb27b6c Mon Sep 17 00:00:00 2001 From: Michael W Date: Mon, 7 May 2012 10:52:33 -0600 Subject: [PATCH] Adds note about system* output. UNTESTED --- collects/scribblings/reference/subprocess.scrbl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/collects/scribblings/reference/subprocess.scrbl b/collects/scribblings/reference/subprocess.scrbl index b748d17aa8..6870945362 100644 --- a/collects/scribblings/reference/subprocess.scrbl +++ b/collects/scribblings/reference/subprocess.scrbl @@ -328,6 +328,15 @@ See also @racket[current-subprocess-custodian-mode] and @racket[subprocess-group-enabled], which affect the subprocess used to implement @racket[system].} +The resulting process writes to @racket[(current-output-port)], reads from +@racket[(current-input-port)], and logs errors to @racket[(current-error-port)]. +This means that processes show output to the screen and read from the keyboard by default. +If you just want to gather the process's output to a string, for example, use: + +@racketblock[ +(with-output-to-string (lambda () (system "date"))) +] + @defproc*[([(system* [command path-string?] [arg (or/c path? string? bytes?)] ...) boolean?] [(system* [command path-string?] [exact 'exact] [arg string?]) boolean?])]{