diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-06-24 19:35:25 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-06-24 19:35:25 -0700 |
commit | 29b6a140e1bbf606c762da5f4555dbb2fba97dcb (patch) | |
tree | 083e07b449120595aceb2ea8c9b7aab9810fe36b | |
parent | 969e45b5a779460e5445595c438814e043aaee7c (diff) | |
download | txr-29b6a140e1bbf606c762da5f4555dbb2fba97dcb.tar.gz txr-29b6a140e1bbf606c762da5f4555dbb2fba97dcb.tar.bz2 txr-29b6a140e1bbf606c762da5f4555dbb2fba97dcb.zip |
doc: document pid argument of open-fileno.
* txr.1: pid argument is documented and also missing,
documentation added about how close-stream deals
with processes.
-rw-r--r-- | txr.1 | 39 |
1 files changed, 37 insertions, 2 deletions
@@ -60078,6 +60078,31 @@ These additional calls ignore the .meta throw-on-error-p argument. +The +.meta stream +may be associated with a process, in one of several ways: implicitly, +by the functions +.code open-process +and +.code open-command +and related functions, or explicitly by the +.code open-fileno +function, if a +.meta pid +argument is specified. +In this situation, +.code close-stream +waits for the termination of that process, after closing the underlying file descriptor. +If the process terminates normally, then +.code close-stream +returns its termination status, which is zero if the termination is successful. +If the status of the process cannot be obtained, or is an abnormal termination, then +the return value is +.codn nil . +In that situation, if +.meta throw-on-error-p +is true, an exception is thrown instead. + .coNP Macro @ with-stream .synb .mets (with-stream >> ( stream-var << init-form ) @@ -72410,12 +72435,12 @@ arguments are Boolean, rather than integer values. .coNP Function @ open-fileno .synb -.mets (open-fileno < file-descriptor <> [ mode-string ]) +.mets (open-fileno < file-descriptor >> [ mode-string <> [ pid ]]) .syne .desc The .code open-fileno -function creates a \*(TX stream over a file descriptor. The +function creates and returns a \*(TX stream over a file descriptor. The .meta file-descriptor argument must be an integer denoting a valid file descriptor. @@ -72425,6 +72450,16 @@ see the .code open-file function. +If the +.meta pid +argument is present, it must be a positive integer corresponding +to a process ID. The +.code open-fileno +function will associate the process ID with the returned stream. +When the stream is closed with +.codn close-stream , +special handling takes place, as documented for that function. + .coNP Function @ fileno .synb .mets (fileno << stream ) |