Returns the exit status of the child process that open-pipe created.
system
pipe-exit-status stream &key timeout wait => exit-status, signal-number
stream⇩ |
A pipe stream. |
timeout⇩ | |
wait⇩ |
A boolean. Deprecated. |
exit-status⇩ |
An integer, nil or the keyword :closed . |
signal-number |
An integer or nil . |
The function pipe-exit-status
returns the exit status of the child process that open-pipe created.
stream must be a pipe stream object which was returned by a call to open-pipe with save-exit-status non-nil.
timeout defaults to nil
, which means that pipe-exit-status
waits until the child process dies. If timeout is a real, it specifies a period of seconds to wait. If the process does not exit before the end of this period, pipe-exit-status
returns nil
. If timeout is 0, pipe-exit-status
never waits at all.
wait is deprecated, and is kept for backward compatibility with releases before LispWorks 8.0. It is ignored if timeout is supplied. If timeout is not supplied and wait is nil
, then pipe-exit-status
does not wait (the same as when timeout is 0). Otherwise wait does not affect the behaviour of pipe-exit-status
.
On Microsoft Windows, if close was called on stream before the child process died, then pipe-exit-status
returns exit-status :closed
. On non-Windows platforms, it works after close but for compatibility it should be called only before calling close. If you need to send an end-of-file to the child process but also want to read the exit status, use pipe-close-connection before calling pipe-exit-status
, and call close afterwards.
If exit-status is not nil
or :closed
, it is an integer which is the exit status of the child process. See 27.7.1 Interpreting the exit status for the interpretation of the exit status and the signal number.
open-pipe
call-system
pipe-kill-process
pipe-close-connection
27.7.1 Interpreting the exit status
LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:31:02