chiark / gitweb /
[PATCH] add MANAGED_EVENT to the forked udev environment
[elogind.git] / udevsend.c
index 9f324077b3b92ee6d3e67f53363ff28566193099..7d865573c27b62f95073cca655df969cb1058941 100644 (file)
@@ -132,6 +132,12 @@ int main(int argc, char *argv[], char *envp[])
                goto exit;
        }
 
+       /* prevent loops in the scripts we execute */
+       if (getenv("MANAGED_EVENT") != NULL) {
+               dbg("seems that the event source is not the kernel, just exit");
+               goto exit;
+       }
+
        sock = socket(AF_LOCAL, SOCK_DGRAM, 0);
        if (sock == -1) {
                dbg("error getting socket");