Plan B User's Manual


Name

selectors ­ Get names for inner boxes.

Synopsis

#include <ulib.h>

void selectors(char* sel, char* buf, int len)

Description

A box may contain inner boxes. Selectors puts into buf at most len bytes with the set of names for inner boxes contained in the box with name and constraint given by sel.

Only top-level names are placed into buf. If several inner boxes have the same name, the name appears once.

Example

selectors("/b/proc!*!p98", p98ones, BUFLEN);
selectors("/b/proc", allofthem, BUFLEN);

The first call would write in p98ones the set of names for p98 processes running, separated by white space. The second call will write all the names, no matter what the architecture is.

Source

/src/b/port/box.c

See also

lb(1).


Plan B User's Manual. First edition.