next up previous
Next: Epilogue and Prologue code Up: Internal Structure of XOK/ExOS Previous: Routes, Interfaces, DNS, ARP,

ExOS Process Management

When an application starts its library operating system must go through what is very similar to a full OS startup in a conventional system. This starts by calling ProcessStartup which then does per-subsystem initialization.[*] Further, the very first process to start does special one-time-per-boot initialization for the entire system.

Sometimes different ExOS subsystems want to be able to do their own processing when a process forks or execs (for example, the fd code wants to close close-on-exec fd's and up the ref counts on the other fd's every time a process forks or execs). We handle this with call-backs. You register a function with OnExec or OnFork or atexit or ExosExitHandler. The function will then be called back with some useful args when the specified event occurrs.[*]



 

Thomas Pinckney
3/17/1998