]> Zhao Yanbai Git Server - minix.git/commitdiff
devmand: don't die so easily
authorDavid van Moolenbroek <david@minix3.org>
Tue, 25 Feb 2014 23:28:43 +0000 (00:28 +0100)
committerLionel Sambuc <lionel@minix3.org>
Mon, 28 Jul 2014 15:05:13 +0000 (17:05 +0200)
Change-Id: I048a975fb35dadf07ebb5d067d76fb1d1892bda8

commands/devmand/main.c

index 0e831adc252a947f163dcb8918dab348dd6495fb..343ef6c9dea017199ba8ecd6cdd2cfb8a48adf19 100644 (file)
@@ -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();