Question

The code I am looking at is here:

http://github.com/andymatuschak/Sparkle/blob/8ea15468b4a8c0487ca7a72f3c9e6ffb708c6af8/SUPipedUnarchiver.m

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?

Was it helpful?

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
scroll top