Lines Matching refs:pe
106 register Pssent_t* pe;
122 pe = pss->ent;
123 if ((i = (*pss->meth->partf)(pss, pe)) < 0)
127 memset(pe, 0, sizeof(*pe));
128 pe->pid = pss->pid;
132 pe->pss = PSS_EXPLICIT;
134 pe->pss = PSS_MATCHED;
139 if ((flags & PSS_TTY) && pe->tty != TTYMAP(pss, pss->disc->tty))
141 if ((flags & PSS_UID) && pe->uid != pss->disc->uid)
146 if (pe->tty == PSS_NODEV)
150 if (pe->tty != PSS_NODEV)
157 if ((fields & PSS_sid) && pe->pid != pe->sid)
159 if ((fields & PSS_tgrp) && pe->pid != pe->tgrp)
163 if ((fields & PSS_sid) && pe->pid == pe->sid)
165 if ((fields & PSS_tgrp) && pe->pid == pe->tgrp)
169 pe->pss = PSS_MATCHED;
178 x = pe->gid;
181 x = pe->pgrp;
184 x = pe->sid;
187 x = pe->tgrp;
190 x = pe->tty;
196 x = pe->uid;
209 pe->pss = PSS_MATCHED;
216 pe->pss = 0;
222 if (pss->meth->fullf && (*pss->meth->fullf)(pss, pe) <= 0)
224 if (pe->pid <= 1 && pe->ppid > 1)
226 pe->ppid = 0;
227 if (pe->pid == 0)
228 pe->args = pe->command = "sched";
230 return pe;
238 psssave(register Pss_t* pss, register Pssent_t* pe)
242 if ((fields & PSS_args) && pe->args)
243 pe->args = vmstrdup(pss->vm, pe->args);
244 if ((fields & PSS_command) && pe->command)
245 pe->command = vmstrdup(pss->vm, pe->command);
246 if ((fields & PSS_sched) && pe->sched)
247 pe->sched = vmstrdup(pss->vm, pe->sched);
248 if ((fields & PSS_tty) && pe->ttyname)
249 pe->ttyname = vmstrdup(pss->vm, pe->ttyname);
251 return pe;
390 pssttyname(register Pss_t* pss, Pssent_t* pe)
396 if (pss->meth->ttynamef && (s = (*pss->meth->ttynamef)(pss, pe)))
398 if (pe->ttyname)
399 return pe->ttyname;
400 dev = pe->tty;