summaryrefslogtreecommitdiff
path: root/games/rain
diff options
context:
space:
mode:
authorRicardo Mestre <mestre@cvs.openbsd.org>2021-10-23 11:22:50 +0000
committerRicardo Mestre <mestre@cvs.openbsd.org>2021-10-23 11:22:50 +0000
commitecd10c1195d7c68d97eb7d679f932aa85ba050a6 (patch)
tree208ed86a4aec6394b30e888b051761c4aa0e22b5 /games/rain
parentd44be2f813bdce978e91422aa39bbc7e6f7466f1 (diff)
if both stdout and stderr are redirected to a non-tty, pledge(2) will kill
ncurses applications, e.g.: /usr/games/worms 2>&1 | cat solve this by only calling pledge(2) after initscr(3) is set and done, or whatever function that calls it. since pledge(2) is called later now the promises might be reduced, but this a diff for another day. found by naddy@ almost a year ago, discussed with him deraadt@ and tb@ ok tb@
Diffstat (limited to 'games/rain')
-rw-r--r--games/rain/rain.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/games/rain/rain.c b/games/rain/rain.c
index 6a10c49d251..1873fa2b917 100644
--- a/games/rain/rain.c
+++ b/games/rain/rain.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rain.c,v 1.21 2016/01/07 16:00:33 tb Exp $ */
+/* $OpenBSD: rain.c,v 1.22 2021/10/23 11:22:49 mestre Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -59,9 +59,6 @@ main(int argc, char *argv[])
int ch;
int xpos[5], ypos[5];
- if (pledge("stdio rpath tty", NULL) == -1)
- err(1, "pledge");
-
/* set default delay based on terminal baud rate */
if (tcgetattr(STDOUT_FILENO, &term) == 0 &&
(speed = cfgetospeed(&term)) > B9600)