[sane-devel] Re: SANE, Darwin, Umax Vista-S6E problems

Randolph Fritz randolph at panix.com
Fri Dec 26 19:19:51 GMT 2003


On Wed, Dec 24, 2003 at 08:38:39PM +0100, Henning Meier-Geinitz wrote:
> Hi,
> 
> On Wed, Dec 24, 2003 at 11:36:47AM -0800, Randolph Fritz wrote:
> > No answer on this one.
> 
> On which one? 
> 
> > So, then.  Let's try narrowing this down.  Does anyone have a Umax
> > Vista-S6E working with SANE on any version of Mac OS 10.2?
> 
> That's unlikely. The UMAX backend still uses fork ().
> 

The code is already there for OS/2--I removed the conditional.  But it
still fails in the same way--stops a bit of the way into a preview
scan with a timeout.

Changes and log attached.  I wonder if this version would work on
Linux.

Randolph
-------------- next part --------------
--- umax.c~	Fri Sep 12 09:10:33 2003
+++ umax.c	Wed Dec 24 23:18:13 2003
@@ -133,9 +133,7 @@
 #include "sane/sanei_backend.h"
 #include "sane/sanei_config.h"
 
-#ifdef HAVE_OS2_H
 # include "../include/sane/sanei_thread.h"
-#endif
 
 #ifdef UMAX_ENABLE_USB
 # include "sane/sanei_usb.h"
@@ -7950,31 +7948,7 @@
   scanner->pipe_read_fd  = fds[0]; 
   scanner->pipe_write_fd = fds[1];
 
-#ifndef HAVE_OS2_H
-  scanner->reader_pid = fork();					     /* create reader routine as new process */
-
-  if (scanner->reader_pid == 0)
-  {									/* reader_pid = 0 ===> child process */
-    sigset_t ignore_set;
-    struct SIGACTION act;
-
-    close(fds[0]); /* forked child process: close read end of pipe, reader_process only needs the write end */
-
-    sigfillset(&ignore_set);
-    sigdelset(&ignore_set, SIGTERM);
-    sigprocmask(SIG_SETMASK, &ignore_set, 0);
-
-    memset(&act, 0, sizeof (act));
-    sigaction (SIGTERM, &act, 0);
-
-    _exit(reader_process(scanner));   /* don't use exit() since that would run the atexit() handlers */
-  }
-
-  close(fds[1]); /* when we use fork then we have to close the write end of the pipe here */
-#else /*  OS2 */
-  /* create reader routine as thread */
   scanner->reader_pid = sanei_thread_begin(reader_process, (void *) scanner);
-#endif
 
  return SANE_STATUS_GOOD;
 }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: debugging_output_2.gz
Type: application/x-gunzip
Size: 7445 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/sane-devel/attachments/20031226/b7968b70/attachment.bin>


More information about the sane-devel mailing list