[sane-devel] pthreads for MacOSX (instead of child process)

abel deuring a.deuring@satzbau-gmbh.de
Thu, 06 Feb 2003 01:30:18 +0100


Beat Birkhofer wrote:
>> Shouldn't the problem solved at the source, i.e. IOKit fixed or a
>> workaound written for that one? Isn't there a way to get the
>> priviledge for access for the second process?
> 
> 
> The fork() problem was discussed on the Apple USB-Dev List. 2002-12-11 
> two (!) Apple developers stated that fork() doesn't' work. Quotation:
> 
>>> I'm pretty sure you do not inherit the connection. The connection is
>>> via a Mach port and the port is not inherited.
>>> -- 
>>> Barry Twycross
>>> BarryT@Apple.com
> 

<flame>
Did they also bother to explain, why no device files are available which 
should not have this problem (well, hoping that device file descriptors 
would survive a fork() on Macos)?
</flame>

> 
> Maybe the libusb one day provides a workaround.

Well, you could try to reverse to roles of parent and child after the 
fork: the parent could control the scanner, while the child talks with 
the frontend... Naaa, I should go to bed...

Abel