SharedErrorsDoc.tioga
Copyright Ó 1990 by Xerox Corporation. All rights reserved.
Chauser, November 20, 1990 3:41 pm PST
SharedErrors
CEDAR 7.0 —
SharedErrors
Carl Hauser
© Copyright 1987 Xerox Corporation. All rights reserved.
Abstract: SharedErrors deals with situations in which you would like to write a simple procedure call, but are required instead to fork some processes to simulate coroutines. A problem in this case is that errors occurring in the children normally are not examined by the signal handling environment carefully built up in the parent. SharedErrors provides just this facility, letting the children share the error handling environment of the parent.
Created by: Carl Hauser
Maintained by: Carl Hauser <CHauser.pa>
Keywords: SIGNAL, ERROR, PROCESS, coroutine
XEROX  Xerox Corporation
   Palo Alto Research Center
   3333 Coyote Hill Road
   Palo Alto, California 94304

1. Fork
There is but a single procedure in the interface, Fork, taking as parameter a list of procedures to be forked. It forks a process for each of the children in such a manner that any errors they don't catch are passed along to the process (the parent) that called Fork. Fork waits for all of the children to complete before returning, so it is OK to pass internal (nested) procedures to it, although the call will have to be wrapped in a TRUSTED block to satisfy the compiler.