devmand: don't die so easily

Change-Id: I048a975fb35dadf07ebb5d067d76fb1d1892bda8
This commit is contained in:
David van Moolenbroek 2014-02-26 00:28:43 +01:00 committed by Lionel Sambuc
parent b539f91aba
commit fa901649a3

View 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();