bind -a #σ /dev /dev/ptrace /dev/ptracectl
The process trace device is a replacement for the trace facility in proc (3) to report more information about process events.
The ptracectl admits the following requests:
size " n Set the size of the buffer to n entries. Before issuing this request tracing is not enabled.
trace " pid value" Set the trace on or off for the process with the given pid.
The ptrace file reports an integral number of events when read. To avoid too much interference with scheduling, it does not block readers. When no more events are available the read returns an EOF indication, but the program is expected to poll the device for further events. This behavior mimics what proc (3) does with the trace interface.
/sys/src/9k/port/devptrace.c
The reader must poll the trace device.