Plan B User's Manual


Name

link ­ Links one box to another.

Synopsis

#include <ulib.h>

void link(char* s, char* d)

Description

Link arranges for the box d to be linked to the box s. S is considered the data source and d is considered the link.

Constraints can be specified in both names to select a pair of appropriate boxes—see copy(2) for examples of this. Both constraints must match as said in intro(1).

The meaning of link depends on the target box. For example, several system boxes accept links as a mean to make them point to the data source; some system boxes accept links as a mean to tell them where to send events; and the expected meaning when used on boxes implemented by the storage server is to replicate data.

Example

link("/b/sys/null", "/b/proc/me/io1");
link("/b/proc/foo", "/b/term/cons/evs");

The first call arranges for the output of the current process to be ignored; the second arranges for the cons terminal to send events (e.g. interrupts) to the foo process.

Source

/src/b/port/box.c

See also

intro(2) and ln(1).

Bugs

The mechanism could be abused. If time tells so, it may be replaced by a different one.


Plan B User's Manual. First edition.