From fa901649a3b3cc128d58f873acfac2a9084b3506 Mon Sep 17 00:00:00 2001 From: David van Moolenbroek Date: Wed, 26 Feb 2014 00:28:43 +0100 Subject: [PATCH] devmand: don't die so easily Change-Id: I048a975fb35dadf07ebb5d067d76fb1d1892bda8 --- commands/devmand/main.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/commands/devmand/main.c b/commands/devmand/main.c index 0e831adc2..343ef6c9d 100644 --- a/commands/devmand/main.c +++ b/commands/devmand/main.c @@ -886,6 +886,15 @@ static void main_loop() fd = fopen(ev_path, "r"); if (fd == NULL) { + /* + * ENFILE is a temporary failure, often caused by + * running the test set. Don't die from that.. + */ + if (errno == ENFILE) { + usleep(50000); + continue; + } + fprintf(stderr,"devmand error: could not open event " "file %s bailing out\n", ev_path); cleanup(); -- 2.44.0