библиотека программных диалогов с интерактивными программами (programmed dialogue library with interactive programs)
Сигналы (Signals)
extern int exp_reading;
extern jmp_buf exp_readenv;
expect
uses alarm() to timeout, thus if you generate alarms
during expect
, it will timeout prematurely.
Internally, expect
calls read() which can be interrupted by
signals. If you define signal handlers, you can choose to
restart or abort expect
's internal read. The variable,
exp_reading
, is true if (and only if) expect
's read has been
interrupted. longjmp(exp_readenv,EXP_ABORT) will abort the read.
longjmp(exp_readenv,EXP_RESTART) will restart the read.