NAME
bat - process manager
DESCRIPTION
Bat is started automatically. It mounts /srv/proc/ and serves one directory per running process named by its pid. Each process directory contains:
- record: the program and its binds; the first line is the program's path and arguments; each following line is a bind, a link whose path is bound under its label
- ns: textual representation of the process's namespace
- status: 'starting', 'started', 'closing'; 'err' if it failed
- err: the reason for failure when status is 'err'
- fs/: program's own files
- ctl: 'close' ends the process
To start a process, put a record to /srv/proc/new, get the new path back.
To restart pid, put a record to /srv/proc/pid/.
To kill a process, del /srv/proc/pid/.
EXAMPLES
Start an anonymous process, get the path to its directory back:
p = req('put', '/srv/proc/new', '/bin/cons')
req('put', p, '/bin/cons') // restart
req('del', p) // kill
Start a named process:
req('put', '/srv/proc/cons', '/bin/cons')
req('put', '/srv/proc/cons', '/bin/cons') // restart
req('del', '/srv/proc/cons') // kill
FILES
/lib/ns default binds
SOURCE
SEE ALSO
wombat/bin/foo reactive(site:notes)