APIs of contexts managed by the process manager

The process manager manages a few contexts of its own.

Todo

Continue to write this.

The process manager provides the initial process these RPC calls on its default context:

os.rpc.alarm(seconds)

Ask for an alarm to be sent to you in a given number of seconds. This function is usually called for sleeping a certain time, by calling it then waiting for the answer.

Example usage:

-- Sleep for five seconds and a half.
rpc.alarm(5.5)

RPC bindings

Todo

What happens if a name is already bound? Should we add the process as an alternative (like /etc/alternatives in Debian), as a fallback if the first call has a problem, or should the binding process fail?

When launched as a service, a program can be limited in terms of what it can bind and run.

os.rpc.bind(name)

Ask for binding the name to the current process.

Parameters

name (str) – A valid procedure name.

os.rpc.unbind(name)

Ask for unbinding the name to the current process.

Parameters

name (str) – A valid procedure name.