[fork] sfeed (atom feed) reader
Log | Files | Refs | README | LICENSE

commit ccef34a432a1a1fab85c9aa44761a9af8e355cc8
parent d86b28d706d506e22625512f82109e28ad94f945
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Mon, 29 Jun 2020 19:50:03 +0200

popen: don't use exec-on-close flag, which is non-POSIX

The "e" flag was an extension on atleast OpenBSD:
"If the letter "e" is present in the string then the close-on-exec flag shall
 be set on the file descriptor underlying the FILE that is returned."

POSIX says:

"If mode is any other value, the result is unspecified."

This causes atleast on HaikuOS to fail and set errno EINVAL.

Theres no need for this flag too so remove it.

Msfeed_curses.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sfeed_curses.c b/sfeed_curses.c @@ -454,7 +454,7 @@ pipeitem(const char *cmd, struct item *item, int wantoutput) } errno = 0; - if (!(fp = popen(cmd, "we"))) { + if (!(fp = popen(cmd, "w"))) { fputs("popen: ", stderr); perror(NULL); _exit(1);