diff --git a/st.c b/st.c index 27536d2..eb5b6b0 100644 --- a/st.c +++ b/st.c @@ -4224,6 +4224,12 @@ run(void) struct timespec drawtimeout, *tv = NULL, now, last, lastblink; long deltatime; +#if defined(__OpenBSD__) + if (pledge("stdio rpath wpath tty proc getpw exec", NULL) < 0) { + die("pledge\n"); + } +#endif + /* Waiting for window mapping */ do { XNextEvent(xw.dpy, &ev); @@ -4247,6 +4253,12 @@ run(void) clock_gettime(CLOCK_MONOTONIC, &last); lastblink = last; +#if defined(__OpenBSD__) + if (pledge("stdio rpath tty proc", NULL) < 0) { + die("pledge\n"); + } +#endif + for (xev = actionfps;;) { FD_ZERO(&rfd); FD_SET(cmdfd, &rfd);