From 6f59ed5547426ddaf6bedf574d19a19f6bd20e1f Mon Sep 17 00:00:00 2001 From: "kay.sievers@vrfy.org" Date: Tue, 23 Nov 2004 06:14:21 +0100 Subject: [PATCH] add MANAGED_EVENT to the forked udev environment This will prevent a loop, if udev sends events back into the daemon. --- udevsend.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'udevsend.c') diff --git a/udevsend.c b/udevsend.c index 9f324077b3..7d865573c2 100644 --- a/udevsend.c +++ b/udevsend.c @@ -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"); -- cgit v1.2.3-54-g00ecf