On Wed, Apr 8, 2009 at 05:58, Peter Rajnoha <prajnoha@xxxxxxxxxx> wrote: > Kay Sievers wrote: >> If you would use the same cookie for several actions, how do you >> track, that udev has finished the work when you expect an arbitrary >> number of events with the same cookie? > > Well, I use a simple semaphore in userspace waiting for zero. So for > every action I just increment the semaphore and when the cookie comes back > from uevent, I decrement it (I use this cookie value as the semaphore's > identifier as well). So the number of uevents I'm expecting is not > arbitrary from this perspective. I just need to fire off all the actions > and then at some point later need to be sure that all the udev rules > were executed (so I'm sure all the nodes are created) and so I can continue. Sure, sounds good. I just read "we can use the cookie value to group the actions" as you would want to use the same value for several actions. Thanks, Kay -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel