[sane-devel] Stuck somehow in porting to Win98/ASPI
richardmetzger at web.de
Tue Aug 9 14:36:46 UTC 2005
Henning Meier-Geinitz <henning at meier-geinitz.de> schrieb am 16.07.05 22:09:14:
> On Fri, Jul 15, 2005 at 12:48:32PM +0200, Richard Metzger wrote:
> > Please, what is the design here? Shouldn't the child block the pipe,
> > so that the parent only returns from read(), when the child wants it
> > to?
> Parent: create pipe, fork, close writing side of pipe, wait for data
> from reading side of pipe
> Child: close reading side of pipe, send data to writing side, when
> finished close writing side
> Parent: when writing side is closed by child, close also reading side
Thanks a lot - that helped a lot to get closer to the problem, which seems to be that the parent's read returns (indicating EOF) before the child has issued it's first write.
I see, that Peter Kirchgessner has implemented a mechanism to retry the read a certain amount of times when EOF is indicated - but only for the non-scsi case. I'll try to mimic this for the scsi part.
Mit WEB.DE FreePhone mit hoechster Qualitaet ab 0 Ct./Min.
weltweit telefonieren! http://freephone.web.de/?mc=021201
More information about the sane-devel