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:
parent
3ecfde193a
commit
0e4a1936ca
7 changed files with 213 additions and 36 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue