Johannes Erdfelt wrote:
>
> The ultimate problem is the applicate needs to inform the USB kernel
> code it's still using the device, so it won't try reassigning that USB
> id to a new device.
In all honesty, I'd been assuming that the user mode file
descriptor would not suddenly start to refer to a different
device .. I hope you're not telling me that doesn't work!
On the other hand, once I have a file descriptor talking to
a USB device, I should have no reason to care whether the
name once associated with the device is now talking to some
other device (and my FD will give me ENODEV whenever I next
try to use it). Physical USB addresses won't matter.
Apps that monitor system status will care about which devices
get added/removed and when, and I may dig out my own post on
that topic from last year sometime. But they're not what I'd
call the "typical" application, even though they're necessary.
> The easiest way to do this, and track abnormal termination of a program,
> is to open a file and keep it open. I think it's a reasonable solution,
> which is both safe and easy, as long as we mandate to user space
> programs that they do this, or they'll have the possibility of races.
Keeping an FD open for such purposes is classic UNIX.
Sufficiently so that if it didn't work, people would
have good reasons to complain!
Correct me if I'm wrong: This involves no changes to
any kernel code.
- Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]