Skip to content

Commit

Permalink
Run pledge only on OpenBSD.
Browse files Browse the repository at this point in the history
  • Loading branch information
leahneukirchen committed Nov 16, 2015
1 parent 4e51ce5 commit 669631e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions calmwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,10 @@ main(int argc, char **argv)
x_init(display_name);
cwm_status = CWM_RUNNING;

#ifdef __OpenBSD__
if (pledge("stdio rpath proc exec", NULL) == -1)
err(1, "pledge");
#endif

while (cwm_status == CWM_RUNNING)
xev_process();
Expand Down

0 comments on commit 669631e

Please sign in to comment.