Name

exit

exit [-onexit [handler] ] [-noexit] [status]

Cause the Expect program to exit. Return the numeric exit status status(default is 0).

The -onexit option specifies a command to use as the exit handler. By default the current exit handler is used.

The -noexit option causes Expect to prepare to exit, calling user-defined and internal exit handlers, but not actually returning control to the operating system.

When the end of a script is reached, an exit command is automatically executed.

Get Tcl/Tk in a Nutshell 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.