Bugs And Workarounds

On some systems, bugs in the operating system prevent correct operation of "spawn -open [open . . .]" on some special files. For example, on SunOS, Expect cannot detect an eof from a fifo. Yet another operating system bug prevents AIX 3.2 from detecting input from physical tty devices.[46]

Fortunately, OS bugs like these are infrequent but Expect does a number of unusual things and you must gird yourself to work around such bugs. In the next section, I will describe a workaround for the fifo problem. A similar workaround can be applied to the other problem.

[46] The effect of this particular bug also shows up in the failure of expect_user to read input. A patch is available from the vendor.

Get Exploring Expect now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.