aboutsummaryrefslogtreecommitdiffstats
path: root/udev.c
diff options
context:
space:
mode:
Diffstat (limited to 'udev.c')
-rw-r--r--udev.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/udev.c b/udev.c
index ca79bb4e..507f2be9 100644
--- a/udev.c
+++ b/udev.c
@@ -61,6 +61,10 @@ static int manage_hotplug_event(void) {
int fd;
int len;
+ /* false, if we are called directly */
+ if (!getenv("MANAGED_EVENT"))
+ goto exit;
+
fd = open("/proc/sys/kernel/hotplug", O_RDONLY);
if (fd < 0)
goto exit;