Your example used sleep, which in some cases is a built-in and
in other cases is an external program.

For testing purposes, you might want to try something different,
e.g. a select statement which will wait for input, and which you
can interrupt:

TMOUT=10
PS3=""
select foo in ""
do :
done

[note that this doesn't do anything useful, and will loop until
it times out if not terminated by a signal or EOF followed by
return]

That should run your interrupt trap when interrupted from the
terminal.  And you could send a signal explicitly (e.g. from
another shell) and that also should trigger your traps.

Note that select is a keyword -- it is processed directly by
ksh -- as opposed to built-in functions and external programs.
_______________________________________________
ast-users mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-users

Reply via email to