summaryrefslogtreecommitdiff
path: root/games/bs
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/bs
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/bs')
-rw-r--r--games/bs/bs.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/games/bs/bs.c b/games/bs/bs.c
index 188933f5aa8..8358ac7dd7a 100644
--- a/games/bs/bs.c
+++ b/games/bs/bs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bs.c,v 1.41 2018/08/24 11:14:49 mestre Exp $ */
+/* $OpenBSD: bs.c,v 1.42 2021/10/23 11:22:48 mestre Exp $ */
/*
* Copyright (c) 1986, Bruce Holloway
* All rights reserved.
@@ -1335,9 +1335,6 @@ scount(int who)
int
main(int argc, char *argv[])
{
- if (pledge("stdio rpath tty", NULL) == -1)
- err(1, "pledge");
-
do_options(argc, argv);
intro();