[Xitami] devices problem
Ewen McNeill
xitami@lists.xitami.org
Sun, 30 Dec 2001 23:14:51 +1300
In message <000201c19116$3954c790$1564a8c0@troy.ozin.foo>, "Jason Ozin at Technica Solutions" writes:
>Ewen says:
> > And my guess is the "something changing" is something like another program
> > having the device open (blocking us out, so we assume it is not a device)
> > when we first try to find out if it is a device, [....]
>
>I'd be surprised if this was the case as it is repeatable on every occasion
>and nothing else is using the device, so the "other program" can only be
>Xitami itself.
I'm not so sure that nothing else is using the device; amongst other
things Windows is able to monitor the paper status of a printer, and I'm
guessing that involves opening the device, querying the status, and
closing the device again. Providing a window of opportunity for Murphy
(of Murphy's law fame) to sneak in.
Given the way that Xitami works I'd be surprised if it was Xitami itself
that was blocking its own test out -- there's no thread switching
between the test point and the file open point. But the OS could switch
to another proram/task.
> > I've got a couple of ideas to try, although as I commented, I'm somewhat
> > hampered by the fact that I can't reproduce the problem...
>
>Happy to install debug code on my PC if it helps. I suppose your code
>automatically denying access to known device names is a no no?
We tried that before. The problem is that there are so many,
undocumented, special ways in which Windows can spot the device name in
a longer path, that it rapidly becomes infeasible to properly check for
known device names without also blocking a whole bunch of filenames
which are otherwise valid.
I'll post something here when I've got a test version with a possible
fix/work around in it.
Ewen
--
Ewen McNeill, Technical Consultant, iMatix Corporation www.imatix.com