1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:48:11 +00:00

LibC: Implement gethostbyname() by talking to the DNSLookupServer.

We now talk to the lookup server over a local socket and it does the lookup
on our behalf. Including some retry logic, which is nice, because it seems
like DNS requests disappear in the ether pretty damn often where I am.
This commit is contained in:
Andreas Kling 2019-03-20 01:15:22 +01:00
parent 3ecfde193a
commit 0e4a1936ca
7 changed files with 213 additions and 36 deletions

View file

@ -85,9 +85,15 @@ VFS* vfs;
int error;
auto* dns_lookup_server_process = Process::create_user_process("/bin/DNSLookupServer", (uid_t)100, (gid_t)100, (pid_t)0, error, { }, { }, tty0);
if (error != 0) {
dbgprintf("error spawning DNSLookupServer: %d\n", error);
hang();
}
auto* window_server_process = Process::create_user_process("/bin/WindowServer", (uid_t)100, (gid_t)100, (pid_t)0, error, { }, { }, tty0);
if (error != 0) {
dbgprintf("error: %d\n", error);
dbgprintf("error spawning WindowServer: %d\n", error);
hang();
}
window_server_process->set_priority(Process::HighPriority);