[sane-devel] Stuck somehow in porting to Win98/ASPI
Richard Metzger
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:
> Hi,
> 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
>
> Bye,
> Henning
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.
Regards,
Richard.
__________________________________________________________
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
mailing list