[sane-devel] Re: updated Fujitsu SANE backend (fwd)

Charles Duffy cduffy at spamcop.net
Wed Feb 22 14:31:18 UTC 2006


I'm trying to do something a bit fancier here now which I think *should* 
work, but which isn't playing nice with the backend.

Pseudocode follows:

   sane_init()
   sane_open()
   while(1) {
     /* OMITTED: wait for a button to be pressed */
     sane_close()
     if fork() {
       exec scanadf
     } else {
       wait() /* let scanadf finish and exit */
       sane_open() /* reopen the device */
     }
   }

After the patch I posted earlier (necessary for exec'd scanadf process 
to be able to access the device), everything works up and until the 
point we come back to the second sane_open() and try looking for button 
presses again.

Attached is logs from a sample run (with no paper in the feed, so 
scanadf's output is comparatively brief); note the errors which occur on 
attempts to get_hardware_status after the device has been reloaded.

Is this an error in my usage, or an issue with the driver?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sanebuttonsd-fork_and_exec.log.bz2
Type: application/x-bzip2
Size: 2740 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20060222/467dd1b5/sanebuttonsd-fork_and_exec.log.bin


More information about the sane-devel mailing list