tdisplaytextitem: check popen() - sacc - sacc(omys), simple console gopher client (mirror) (HTM) git clone https://git.parazyd.org/sacc (DIR) Log (DIR) Files (DIR) Refs (DIR) LICENSE --- (DIR) commit 802d765ffd723b0e3298d6f070bf5301ae0ddadd (DIR) parent e1eceee39ab489e5bc8ead2f8244b0cad3d1618f (HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sun, 25 Feb 2018 16:32:48 +0100 displaytextitem: check popen() $PAGER is always set, but this might fail if resource limits or other restrictions are set. Diffstat: M sacc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- (DIR) diff --git a/sacc.c b/sacc.c t@@ -248,7 +248,8 @@ displaytextitem(Item *item) return; case 0: parent = 0; - pagerin = popen("$PAGER", "we"); + if (!(pagerin = popen("$PAGER", "we"))) + _exit(1); fputs(item->raw, pagerin); exit(pclose(pagerin)); default: