bind -a '#C' / /cmd/clone /cmd/<n>/ctl /cmd/<n>/data /cmd/<n>/status
exec oscmd args...Prior to launching the command cmd prints at the console a line (128 bytes, maximum) of the format:
devcmd: 'oscmd args...' pid pidThe string between the single quotes matches the command written to
File offset is ignored for both reading and writing.
Writing to /cmd/<n>/data sends the data into the command's standard input.
cmd/n refcnt state cmd args...where each field separator is a single blank. The meaning of each field is:
The directory n where status resides.|
The number (decimal) of open file descriptors for |
The status of the interface in directory /cmd/<n>. States are shown below.|
The active command. Output only for state Execute.|
A cmd directory <n> can be in one of the following states
Allocated for use but not yet running a command.|
Running a command|
Command completed. Available for reallocation via |
Once closed, a directory <n> created by cmd persists and is reused by cmd in response to later openings of /cmd/clone. The cmd device only creates a new directory when all others, if any, are in use.
The command is run via the /bin/sh program as follows
/bin/sh -c 'cmd args...'Emulator run by root:
If available, the emulator runs the command with a host user ID (uid) and host group ID (gid) corresponding to Inferno's representation for the user's identity. If not available, the emulator runs the command with uidnobody and gidnobody.
Emulator not run by root:
Commands are run on the host with the same host identity as the emulator
The command is always run with the same host identity as the emulator.
emu - Inferno emulator in Chapter 4|
os - interface OS commands (hosted Inferno only) in Chapter 5|