diff options
author | pjd <pjd@FreeBSD.org> | 2013-11-15 19:55:35 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2013-11-15 19:55:35 +0000 |
commit | 6175f0915f143e6a7f6b234029a6317ac6f1516f (patch) | |
tree | 9679ecc5e195f976c67d86f2f4fd3f9424b98ee2 /usr.bin/procstat | |
parent | f5a8595bc4fccca3eb882d06ba41dd4960c012b9 (diff) | |
download | FreeBSD-src-6175f0915f143e6a7f6b234029a6317ac6f1516f.zip FreeBSD-src-6175f0915f143e6a7f6b234029a6317ac6f1516f.tar.gz |
Replace CAP_POLL_EVENT and CAP_POST_EVENT capability rights (which I had
a very hard time to fully understand) with much more intuitive rights:
CAP_EVENT - when set on descriptor, the descriptor can be monitored
with syscalls like select(2), poll(2), kevent(2).
CAP_KQUEUE_EVENT - When set on a kqueue descriptor, the kevent(2)
syscall can be called on this kqueue to with the eventlist
argument set to non-NULL value; in other words the given
kqueue descriptor can be used to monitor other descriptors.
CAP_KQUEUE_CHANGE - When set on a kqueue descriptor, the kevent(2)
syscall can be called on this kqueue to with the changelist
argument set to non-NULL value; in other words it allows to
modify events monitored with the given kqueue descriptor.
Add alias CAP_KQUEUE, which allows for both CAP_KQUEUE_EVENT and
CAP_KQUEUE_CHANGE.
Add backward compatibility define CAP_POLL_EVENT which is equal to CAP_EVENT.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Diffstat (limited to 'usr.bin/procstat')
-rw-r--r-- | usr.bin/procstat/procstat_files.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/procstat/procstat_files.c b/usr.bin/procstat/procstat_files.c index d65c1ae..484dc2d 100644 --- a/usr.bin/procstat/procstat_files.c +++ b/usr.bin/procstat/procstat_files.c @@ -203,8 +203,9 @@ static struct cap_desc { { CAP_SEM_WAIT, "sw" }, /* Event monitoring and posting. */ - { CAP_POLL_EVENT, "po" }, - { CAP_POST_EVENT, "ev" }, + { CAP_EVENT, "ev" }, + { CAP_KQUEUE_EVENT, "ke" }, + { CAP_KQUEUE_CHANGE, "kc" }, /* Strange and powerful rights that should not be given lightly. */ { CAP_IOCTL, "io" }, |