Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 May 2014 00:09:25 +0200
From:      Mateusz Guzik <mjguzik@gmail.com>
To:        freebsd-arch@freebsd.org
Subject:   safer alternative for pfind and pget?
Message-ID:  <20140502220925.GB28158@dft-labs.eu>

next in thread | raw e-mail | index | archive | help
(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>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140502220925.GB28158>