expect Structures¶
- struct struct-spawn¶
- Field:
argv
- Field:
pid
- Field:
mfd
- Field:
mode
- Field:
buffer
- Field:
matched
- Field:
eof
- Field:
timeout
- Field:
log-file
- Field:
lfh
- Field:
status
- Field:
pending-eof
- Canonical:
expect/struct-spawn
argv is the arguments to spawn
pid is the Process ID of the spawned process
mfd is master file descriptor of the pseudo-terminal
mode is the libc/struct-termios of the initial state of the standard input device
buffer is current unmatched input from the pseudo-terminal
If new data was required to be read and after matching has been attempted but no match made, buffer may be truncated to the most recent exp-match-max code points.
The following attributes are used internally and are not supported for use by users:
matched is a flag indicating whether a match occurred
eof is a flag indicating whether End of File was indicated for the pseudo-terminal
timeout is a flag indicating if interaction with the pseudo-terminal timed out
The timeout used is exp-timeout in seconds.
log-file is the file argument passed to exp-log-file
lfh is the file handle derived from log-file
status is the status as reported by exp-wait plus a decoding of that status, eg.
(exit 0)
- function expect/struct-spawn? o¶
Is o a struct-spawn?
- Param o:
value to test
- Return:
boolean
- function expect/make-struct-spawn argv pid mfd mode¶
create an instance of a struct-spawn
- Param argv:
command and arguments
- Type argv:
list
- Param pid:
Process ID of spawned process
- Type pid:
C/int
- Param mfd:
master file descriptor of pseudo-terminal
- Type mfd:
C/int
- Param mode:
initial terminal mode os standard input
- Type mode:
- Return:
struct-spawn
- Rtype:
struct-instance
The buffer attribute is initialised to the empty string,
""
, and the remaining attributes initialised to#f
.
Last built at 2024-12-21T07:10:38Z+0000 from 62cca4c (dev) for Idio 0.3.b.6