Adds note about `system*' output.

(Slightly revised by Eli.)
This commit is contained in:
Eli Barzilay 2012-05-09 03:48:55 -04:00
parent 267a009e03
commit f1a7517ab6

View File

@ -320,22 +320,23 @@ real process ID).}
Executes a Unix, Mac OS X, or Windows shell command synchronously
(i.e., the call to @racket[system] does not return until the
subprocess has ended). The @racket[command] argument is a string
or byte string containing no nul characters. If the command succeeds, the return
value is @racket[#t], @racket[#f] otherwise.
subprocess has ended). The @racket[command] argument is a string or
byte string containing no nul characters. If the command succeeds, the
return value is @racket[#t], @racket[#f] otherwise.
See also @racket[current-subprocess-custodian-mode] and
@racket[subprocess-group-enabled], which affect the subprocess used to
implement @racket[system].}
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:
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 usually
interact with the user like regular code. 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?]