int setpri(int pri);
void swiproc(Proc *p, int interp);
void pexit(char*, int);
The new process always acquires the following attributes from the creating process:
Several resources can be shared with the creating process on request, as determined by flags, which is the logical OR of a subset of the following:
If a particular option is not set, the new process will have a nil reference for the corresponding resource.
Setpri sets the priority of the calling process to pri and returns its previous priority level. If a (now) higher priority process is ready to run, the system will reschedule. The available priority levels are shown below, arranged from highest to lowest priority, with examples of the type of processes intended to use them:
Swiproc sends a software interrupt to process p, causing it to wake from sleep(10.2) with an error(10.2) `interrupted'. Unless interp is non-zero (ie, the Dis interpreter is the caller), the process is also marked `killed'.
An Inferno process terminates only when it calls pexit, thereby terminating itself. There is no mechanism for one process to force the termination of another, although it can send a software interrupt using swiproc. The arguments to pexit are ignored in Inferno, but are included for compatibility with kernel components of Plan 9; use
pexit("", 0);
KPROC(10.2 ) | Rev: Tue Mar 31 02:42:39 GMT 2015 |