Re: "broken pipe", but not when debugging...


Graham Cox
 

On 11 Aug 2017, at 1:42 pm, Graham Cox <graham@mapdiva.com> wrote:

Traditionally the workaround has been to call signal() to install a process-wide no-op handler for SIGPIPE, but on Apple platforms (and others?) you can also set a flag on the file descriptor telling it not to raise the signal. I was going to write that it’s an option to setsockopt, but then I remembered you’re using a pipe not a socket. So I’m not sure what system call you’d use; ioctl maybe?

OK, I’ll look into doing something like this.

Well, this is so far a blind alley.

I can’t find any mention of functions called signal() or ioctl() in the current (Xcode 8) documentation browser. But then, it seems we’ve lost the ability to view man pages. WTF, why are we going backwards with every “update”?

Assume I’m only 5. Where to I find those functions and some sort of documentation for them?

—Graham

Join cocoa@apple-dev.groups.io to automatically receive all group messages.