Commit ce7d37ad authored by BinLi's avatar BinLi Committed by Dan Williams

dns: fix race waiting for netconfig

parent 786ac623
...@@ -329,6 +329,10 @@ dispatch_netconfig (const char *domain, ...@@ -329,6 +329,10 @@ dispatch_netconfig (const char *domain,
ret = waitpid (pid, NULL, 0); ret = waitpid (pid, NULL, 0);
if (ret < 0 && errno == EINTR) if (ret < 0 && errno == EINTR)
goto again; goto again;
else if (ret < 0 && errno == ECHILD) {
/* When the netconfig exist, the errno is ECHILD, it should return TRUE */
return TRUE;
}
return ret > 0; return ret > 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment