[Lazarus] stale pipe workarounds

Andrew Haines andrewd207 at aol.com
Sun Nov 20 07:01:13 CET 2016


On 11/19/2016 10:50 PM, Lars via Lazarus wrote:
> Hi while researching help systems I came across the code which uses IPC to
> communicate and see that people are adding stale pipe work arounds.
>
> So this can't be resolved in the ipc code itself and must be in the
> application?  Just wondering why these work arounds are needed and when
> they occur. The stale pipe code work around is at
>
> https://github.com/graemeg/lazarus/blob/upstream/components/chmhelp/packages/help/lhelpcontrol.pas
>
> So does anyone who uses IPC have to be aware of this and add the work
> around to all ipc code in all applications?  Or it only happens in certain
> cases? It just makes me scared that there is this hack/fix needed.

FPC now has this stale pipe detection included. The fix was added to the 
code lazarus uses until the next official version of FPC was released 
and went into the develop version of fpc in early 2012. At this point it 
could probably be removed form lazarus since there have been multiple 
releases of fpc since then.

https://github.com/graemeg/freepascal/blob/master/packages/fcl-process/src/unix/simpleipc.inc#L97

https://github.com/graemeg/freepascal/commit/439236b9df1e952ad0fc1da42f05851dfea459ac


Regards,

Andrew Haines




More information about the Lazarus mailing list