[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: debian and UDEV



On Wed, May 17, 2006 at 12:19:35AM +0200, Goswin von Brederlow wrote:
> Matt Zimmerman <mdz@debian.org> 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.

> 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.

> > 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"
> afaik.

It may be possible to check that all pending udev events have completed.

-- 
 - mdz



Reply to: