diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-03-20 01:15:22 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-03-20 01:15:22 +0100 |
commit | 0e4a1936ca3767c0d1ab2953b3061c5324bf4834 (patch) | |
tree | ac41058fb88287e90fce7150445928fa3f4c1286 /Kernel/init.cpp | |
parent | 3ecfde193ad03e278730cb538d7aba2177361ad7 (diff) | |
download | serenity-0e4a1936ca3767c0d1ab2953b3061c5324bf4834.zip |
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.
Diffstat (limited to 'Kernel/init.cpp')
-rw-r--r-- | Kernel/init.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Kernel/init.cpp b/Kernel/init.cpp index a957b112d7..728a72c411 100644 --- a/Kernel/init.cpp +++ b/Kernel/init.cpp @@ -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); |