popen: remove close-on-exec flag to increase portability a bit - sacc - sacc(om… | |
git clone git://bitreich.org/sacc/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65… | |
Log | |
Files | |
Refs | |
Tags | |
LICENSE | |
--- | |
commit f1432f5a5c56bad44485d9dee8fe92e6d09e1f4c | |
parent 62d746cb6d34ed43068386bcd4a75f828055ee5e | |
Author: Hiltjo Posthuma <[email protected]> | |
Date: Thu, 2 Jul 2020 23:26:09 +0200 | |
popen: remove close-on-exec flag to increase portability a bit | |
POSIX says: | |
"If mode is any other value, the result is unspecified.". | |
On atleast older glibc versions (afaik 2008 and older) and on current HaikuOS | |
it seems to not execute popen when "e" is set and set errno to EINVAL. | |
Diffstat: | |
M sacc.c | 2 +- | |
1 file changed, 1 insertion(+), 1 deletion(-) | |
--- | |
diff --git a/sacc.c b/sacc.c | |
@@ -285,7 +285,7 @@ displaytextitem(Item *item) | |
return; | |
case 0: | |
parent = 0; | |
- if (!(pagerin = popen("$PAGER", "we"))) | |
+ if (!(pagerin = popen("$PAGER", "w"))) | |
_exit(1); | |
fputs(item->raw, pagerin); | |
exit(pclose(pagerin)); |