NAME
TclCreateCloseHandler, TclDeleteCloseHandler - arrange for callbacks
when channels are closedSYNOPSIS
##iinncclluuddee <
void TTccllCCrreeaatteeCClloosseeHHaannddlleerr(channel, proc, clientData) void TTccllDDeelleetteeCClloosseeHHaannddlleerr(channel, proc, clientData) AARRGGUUMMEENNTTSS> TclChannel channel (in) The channel for which to cre-
ate or delete a close call-
back. TclCloseProc *proc (in) The procedure to call as the callback.ClientData clientData (in) Arbitrary one-word value to
pass to proc.DESCRIPTION
TTccllCCrreeaatteeCClloosseeHHaannddlleerr arranges for proc to be called when channel is closed with TTccllCClloossee or TTccllUUnnrreeggiisstteerrCChhaannnneell, or using the Tcl cclloossee command. Proc should match the following prototype: typedef void TclCloseProc( ClientData clientData); The clientData is the same as the value provided in the call to TTccllCCrreeaatteeCClloosseeHHaannddlleerr. TTccllDDeelleetteeCClloosseeHHaannddlleerr removes a close callback for channel. The procand clientData identify which close callback to remove; TTccllDDeelleettee-
CClloosseeHHaannddlleerr does nothing if its proc and clientData arguments do not match the proc and clientData for a close handler for channel.SEE ALSO
close(n), TclClose(3), TclUnregisterChannel(3) KKEEYYWWOORRDDSS callback, channel closing Tcl 7.5 TclCreateCloseHandler(3)