Well-behaved microsensors
Microsensors are loadable objects that the microsensor resource manager loads in its process space. Consequently, they affect the overall behavior of the microsensor resource manager.
To maximize control over their behavior, you need to adhere to the following principles when creating microsensors:
- Microsensors must not change the disposition of signals. Signals affect the behavior of the entire process, and shared libraries or other modules that are loaded and executed in another process space cannot make any assumption about how the program loading them handles signals.
- Microsensors must not change the identity of the process in which they run. Microsensors cannot change the user identity (real, effective, and saved) of the process or the thread they in which they run. Microsensors are expected to run with root privileges in the IBM.MicrosensorRM process.
- Microsensors must not call process exiting routines, such as exit() and abort(). Like any loadable object or shared library, microsensors must not terminate the process in which they run.
- Microsensors must return clear and unambiguous return codes. Each error condition encountered by the exported interface must be clearly identified by a distinct return code that is thoroughly described in the microsensor documentation.