1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 23:17:46 +00:00

host: Use pledge()

This commit is contained in:
Andreas Kling 2020-01-11 20:49:31 +01:00
parent d30d3fac6f
commit 8c2009c5be

View file

@ -3,9 +3,15 @@
#include <netinet/in.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
int main(int argc, char** argv)
{
if (pledge("stdio dns", nullptr) < 0) {
perror("pledge");
return 1;
}
if (argc < 2) {
printf("usage: host <hostname>\n");
return 0;