diff options
author | kay.sievers@vrfy.org <kay.sievers@vrfy.org> | 2004-11-23 06:14:21 +0100 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-04-26 22:35:00 -0700 |
commit | 6f59ed5547426ddaf6bedf574d19a19f6bd20e1f (patch) | |
tree | d2df87bc0296dea39bc826d76b8d6e964aebe130 /udevsend.c | |
parent | a97b06483e3006a7d21e534694e8d67d3b3c694d (diff) |
[PATCH] add MANAGED_EVENT to the forked udev environment
This will prevent a loop, if udev sends events back into the
daemon.
Diffstat (limited to 'udevsend.c')
-rw-r--r-- | udevsend.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/udevsend.c b/udevsend.c index 9f324077b..7d865573c 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"); |