safer alternative for pfind and pget?
Mateusz Guzik
mjguzik at gmail.com
Fri May 2 22:09:31 UTC 2014
(I hope this list is ok.)
Hello,
currently when one wants to lookup a process there are only 2 functions
to help:
- pfind which provides no filtering whatsoever
- pget which provides limited (mostly negative) filtering
This leads to bugs since it places burden on all callers to make sure they
filter out all states they cannot cope with (new, exiting, execing) and
it is easy to miss some.
So I would like to change this so that default function to use would
provide the following semantics:
with no flags it returns a fully constructed not-exiting process which
the caller can debug
Flags allow to ignore each restriction.
It is unclear to me if this should replace pget or a new function should
be created and all pget callers converted over time (and selected pfind
callers).
Thoughts?
--
Mateusz Guzik <mjguzik gmail.com>
More information about the freebsd-arch
mailing list