Hi,

After all ncurses initialization pledge(2) can be reduced only to
stdio/tty operations on worms(6).

OK?

Index: worms.c
===================================================================
RCS file: /cvs/src/games/worms/worms.c,v
retrieving revision 1.28
diff -u -p -u -r1.28 worms.c
--- worms.c     5 Mar 2016 07:47:15 -0000       1.28
+++ worms.c     5 Aug 2018 20:15:07 -0000
@@ -286,6 +286,10 @@ main(int argc, char *argv[])
                        refresh();
                }
        }
+
+       if (pledge("stdio tty", NULL) == -1)
+               err(1, "pledge");
+
        for (;;) {
                refresh();
                if (sig_caught) {

Reply via email to