[sane-devel] Weird behavior in exagear.

Olaf Meeuwissen paddy-hack at member.fsf.org
Sat Jan 13 01:55:00 UTC 2018

Hi Jeff,

Jeff Sadowski writes:

> My code is simply calling scanimage the way I posted here already.
> Running the same commands by hand results in the same behaviour. I
> have my code write the command it runs in a file called ran.txt, so I
> can examine it and run it. I'm just using php to open a 3 pipe method
> of running scanimage. it is actually running it under "script" which
> allows scanimage to continually write to stdout/stderr without
> blocking which gets written to a stdout.txt and stderr.txt files. I
> also implemented the ability to send ctrl-c using the 3rd input pipe.
> So if my loop that is reading the pipes sees that a certain file
> exists and is still running it will send a ctrl-c. My frontend starts
> this php script and detaches and then reads it's output files to see
> what is going on it also continually loads the image being created by
> scanimage. I get the latest page number from stdout.txt/stderr.txt and
> the name of the file from my rant.txt looking for '--batch= and the
> matching quote and replace all %d with the last page number and then I
> have my image retrieve send that file. :-)

I see.  So you're just layering on top of scanimage.  I thought you we
using a PHP layer on top of the SANE C API.  Sorry for overthinking
things.  The image acquisition logic in scanimage is correct so the
problem appears to be in the brother backend.

Sorry for the detour,
Olaf Meeuwissen, LPIC-2            FSF Associate Member since 2004-01-27
 GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13  F43E B8A4 A88A F84A 2DD9
 Support Free Software                        https://my.fsf.org/donate
 Join the Free Software Foundation              https://my.fsf.org/join

More information about the sane-devel mailing list