[fpc-pascal] When Pascal code is too fast

Marco van de Voort marcov at stack.nl
Thu Nov 1 09:13:34 CET 2007

> On 11/1/07, Marc Santhoff <M.Santhoff at t-online.de> wrote:
> > Something like
> >
> >         fcntl(fileno(stderr), F_GETFL) & O_NONBLOCK
> >
> > or the pascal equivalent should do.
> I'm getting -1 from fpWrite for a "long" period of time, like 6-7 loop
> returns before it can continue getting the my next content, only to
> have the same problem repeated...

Check errno, an if it is EAGAIN, try... again :-)

Maybe some libc versions do this in their libc (as opposed to kernel) read/write
versions already.

More information about the fpc-pascal mailing list