[fpc-pascal] Re: How to handle SIGPIPE

Tobias Giesen tobias_subscriber at tgtools.com
Tue Mar 20 08:41:57 CET 2012


Hi,

I think the biggest issue is that MSG_NOSIGNAL is not defined on MAC OS,
even though it was added a few years (?) ago. When I ported Synapse,
unfortunately I defined it as 0. Now I changed that to $20000 and I'm
hoping for the best ...

I also added this to my program, is that correct?

var NewSigRecSigActionRec;
    res:Integer;

initialization

  with NewSigRec do begin
    Integer(@Sa_Handler):=SIG_IGN; // ignore signal
    Sa_Mask[0]:=0;
    Sa_Flags:=0;
    end;
  res:=fpsigaction(SIGPIPE, at NewSigRec, at OldSigRec);

Cheers,
Tobias





More information about the fpc-pascal mailing list