pledge after setup and initialization. "rpath" to build menus for exec,
exec_wm and ssh; then "proc exec".

Note that portable (and various forks) can deal.

Thanks,
Okan

Index: calmwm.c
===================================================================
RCS file: /home/open/cvs/xenocara/app/cwm/calmwm.c,v
retrieving revision 1.95
diff -u -p -r1.95 calmwm.c
--- calmwm.c    10 Nov 2015 20:05:33 -0000      1.95
+++ calmwm.c    11 Nov 2015 14:42:05 -0000
@@ -113,6 +113,10 @@ main(int argc, char **argv)
 
        x_init(display_name);
        cwm_status = CWM_RUNNING;
+
+       if (pledge("stdio rpath proc exec", NULL) == -1)
+               err(1, "pledge");
+
        while (cwm_status == CWM_RUNNING)
                xev_process();
        x_teardown();

Reply via email to