1

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?

mxcl
  • 26,392
  • 12
  • 99
  • 98

1 Answers1

0

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().

AProgrammer
  • 51,233
  • 8
  • 91
  • 143
  • I don't understand the first sentence, but will look up socketpair. Thanks. – mxcl Aug 29 '09 at 17:09
  • So you can't get sigpipe for a socketpair? I can't find that information. – mxcl Aug 29 '09 at 17:14
  • With a socketpair you can use the send() call, and send() can (on BSDs atleast) take MSG_NOSIGNAL as a flag parameter which causes it to not deliver SIGPIPE. – nos Aug 29 '09 at 20:57