How to get backchannel file descriptor
Michael R Sweet
msweet at apple.com
Tue Aug 19 21:00:22 PDT 2008
keens312 wrote:
>> keens312 wrote:
>>> Hi Michael,
>>>
>>> In the filter for backchannel, I created a thread to keep reading feedback from printer...
>>>
>>> On OSX 10.5, CUPS has created backchannel FDs for USB and Network backends.
>>>
>>> The question is how to get the correct file descriptor in filter?
>> Use the supplied API: cupsBackChannelRead. The file descriptor itself
>> is #3.
>>
>> --
>> ______________________________________________________________________
>> Michael R Sweet Senior Printing System Engineer
>>
> To support OSX 10.3.9, I don't use cupsBackChannelRead.
>
> I am going to use fixed FD #3 for backchannel, hoping this FD will never be changed.
We have no plans to change it, but you shouldn't depend on that.
Use weak linking and test for the availability of the function at
run-time:
if (cupsBackChannelRead != NULL)
/* start read thread */
--
______________________________________________________________________
Michael R Sweet Senior Printing System Engineer
More information about the cups
mailing list