clarify need to wait on a subprocess

svn: r14468
This commit is contained in:
Matthew Flatt 2009-04-08 18:38:59 +00:00
parent a1cc8d30a1
commit 12b81e0cd7

View File

@ -73,7 +73,11 @@ The @scheme[subprocess] procedure returns four values:
@bold{Important:} All ports returned from @scheme[subprocess] must be
explicitly closed with @scheme[close-input-port] or
@scheme[close-output-port].
@scheme[close-output-port]. Similarly, waiting on the subprocess value
(using @scheme[subprocess-wait] or @scheme[sync]) ensures that the
operating system can release the subprocess; for example,
exiting without waiting on a subprocess under Unix risks leaving the
subprocess as a zombie.
The returned ports are @tech{file-stream ports} (see
@secref["file-ports"]), and they are placed into the management of
@ -85,7 +89,9 @@ communication.}
@defproc[(subprocess-wait [subproc subprocess?]) void?]{
Blocks until the process represented by @scheme[subproc] terminates.}
Blocks until the process represented by @scheme[subproc]
terminates. The @scheme[subproc] value also can be used with
@scheme[sync] and @scheme[sync/timeout].}
@defproc[(subprocess-status [subproc subprocess?])