On Wed, May 17, 2006 at 12:19:35AM +0200, Goswin von Brederlow wrote:
> Matt Zimmerman <[EMAIL PROTECTED]> 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


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to