Ignore SIGPIPE for a single popen'd FILE*
Question
The code I am looking at is here:
Sparkle is like a plugin. It can be instantiated in a multi-threaded program. Thus I don't want to call signal(SIGPIPE, SIG_IGN) (ie. ignore all SIGPIPE) as who knows what other threads are doing/expecting.
How can I disable the SIGPIPE signal for this one FILE pointer opened via popen?
Solution
If the specs you are using to write your plugin don't specify what you have to do, I see nothing you can do with pipe(). A possible way to get out of this problem would be to write a popen() equivalent using socketpair() and fdopen().
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow