
attempt to do direct dispatching from within a callback routine or any function that has been
called indirectly by the Notifier.
These two methods of dispatching make porting programs that do not use the Notifier much
easier. Thus, building an XView interface on top of a typical mainline-based, input-driven
program is also much easier. Programs written from scratch should try to follow the event-
driven input style of program design and try to avoid using implicit or explicit dispatching
whenever possible.
20.10.1 Mass Destruction
The following routine causes all the client destruction routines to be called immediately with
a destroy status set to status:
Notify_error
notify_die(status)
Destroy_status status;
This routine causes all the client destruction functions to be called immediately with sta-
tus as the reason. The return values are NOTIFY_OK or NOTIFY_DESTROY_VETOED; the lat-
ter indicates that someone called notify_veto_destroy() and status was DES-
TROY_CHECKING
. It is then the responsibility of the caller of notify_die() to exit the
process, if so desired. Refer to the discussion on notify_post_destroy for more infor-
mation.
20.10.2 Implicit Dispatching
Implicit dispatching is used whenever you wish to loop on a call that might block, such as
read (2). Before calling read(), you should first call the function: notify_do_dis-
patch(); This tells the Notifier that you are going to do implicit ...