-/* $OpenBSD: rain.c,v 1.17 2013/08/29 20:22:18 naddy Exp $ */
+/* $OpenBSD: rain.c,v 1.18 2015/10/14 07:19:23 semarie Exp $ */
/*
* Copyright (c) 1980, 1993
int ch;
int xpos[5], ypos[5];
+ if (pledge("stdio rpath getpw tty", NULL) == -1)
+ err(1, "pledge");
+
/* set default delay based on terminal baud rate */
if (tcgetattr(STDOUT_FILENO, &term) == 0 &&
(speed = cfgetospeed(&term)) > B9600)
timespecadd(&sleeptime, &sleeptime, &sleeptime);
initscr();
+
+ if (pledge("stdio tty", NULL) == -1)
+ err(1, "pledge");
+
tcols = COLS - 4;
tlines = LINES - 4;