ptrap – plumber(4) filter|
ptrap port [!]regexp [ port [!]regexp ... ]|
Ptrap is a program that mounts itself over a plumber(4) service
mounted at /mnt/plumb and filters incoming messages according
to the rules provided on the command line. |
Ptrap accepts an arbitrary number of argument pairs; each pair
consists of a port name port and a regular expression regexp (see
regexp(6)). Each incoming message that does not match regexp is
discarded. The regexp can be optionally prefixed by ! to indicate
logical inversion (i.e. messages matching the regexp are
Start a sam(1) instance dedicated to editing kernel source code:|
Multiple filters specified on the same port ignore all but the
last one. |
Ptrap would be more useful if it could inhibit sending the message to other clients.
As far as plumber(4) is concerned, even messages dropped by ptrap are "accepted", which means rules that are supposed to apply to messages not accepted by clients are not invoked (e.g. a rule starting an editor if no one is listening to the edit port will not work if there is a ptrap on that port).
Ptrap first appeared in 9front (February, 2018).|