[fpc-pascal] Re: How to handle SIGPIPE

michael.vancanneyt at wisa.be michael.vancanneyt at wisa.be
Tue Mar 20 10:05:29 CET 2012



On Tue, 20 Mar 2012, Tobias Giesen wrote:

> 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?

At first sight: yes.

Michael.

>
> 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
>
>
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>



More information about the fpc-pascal mailing list