+ /* guarantee that the udev daemon isn't pre-processing */
+ if (getuid() == 0) {
+ struct udev_ctrl *uctrl;
+
+ uctrl = udev_ctrl_new_from_socket(udev, UDEV_CTRL_SOCK_PATH);
+ if (uctrl != NULL) {
+ if (udev_ctrl_send_ping(uctrl, timeout) < 0) {
+ info(udev, "no connection to daemon\n");
+ udev_ctrl_unref(uctrl);
+ rc = 0;
+ goto out;
+ }
+ udev_ctrl_unref(uctrl);
+ }
+ }
+
+ for (;;) {
+ struct stat statbuf;
+ const struct timespec duration = { 0 , 1000 * 1000 * 1000 / LOOP_PER_SECOND };
+
+ if (exists != NULL && stat(exists, &statbuf) == 0) {
+ rc = 0;