xbattmon

simple battery monitor for X
git clone git://git.2f30.org/xbattmon
Log | Files | Refs | README | LICENSE

commit dc1ccea8b1b52c8236325f3f688ab0a473e3774e
parent 48b2c54f609e276c53f724ef41710e91b38673b5
Author: Klemens Nanni <kn@openbsd.org>
Date:   Tue, 16 Jul 2019 14:16:43 +0200

Use unveil(2)

On OpenBSD, after opening the apm(4) device, no other files need to be
read, so hide the entire filesystem at runtime.

Diffstat:
Mxbattmon.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/xbattmon.c b/xbattmon.c @@ -465,6 +465,8 @@ main(int argc, char *argv[]) setup(); #ifdef __OpenBSD__ openbat(); + if (unveil(NULL, NULL) == -1) + err(1, "unveil"); #endif pollbat(); redraw();