Re: debian and UDEV
Matt Zimmerman <firstname.lastname@example.org> writes:
> On Wed, May 17, 2006 at 12:19:35AM +0200, Goswin von Brederlow wrote:
>> Matt Zimmerman <email@example.com> writes:
>> > You don't need to wait for a particular event to be finished processing;
>> > instead you should wait for the resource you actually need to become
>> > available, e.g. a device node.
>> And how do you detect the resource not becoming available?
> With a timeout.
== race condition.
>> Say I add a fsck script that runs before the final device node is
>> created for any disk that gets added. That could take way longer than
>> even the 3 minute timeout of the udevsettle.
> Why (and, for that matter, how) would you want to try to operate on the
> device before the device node is created? This seems rather contrived.
You create a temporary one in a private dir or one with private
The later would probably screw your detection software totaly as the
device appears but remains inaccessible till fsck is done.
>> > It would be useful to add a simple utility for this to debianutils or
>> > similar so that it doesn't need to be reimplemented in so many places.
>> I don't see any way to make this utility without having a race
>> condition as it is. udev has no concept of "this rule is finished"
> It may be possible to check that all pending udev events have completed.
Which is still stupid not to have in the kernel API as feedback from
the event manager and have insmod optionaly block.