about summary refs log tree commit diff stats
path: root/helloworld.c.txt
blob: fcae386fc619d81b34b8fe2d6ddaa8372b80c844 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <err.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>

int
main(void)
{
    if (-1 == pledge("stdio", NULL)) 
        err(EXIT_FAILURE, "pledge");
    puts("Status: 200 OK\r");
    puts("Content-Type: text/html\r");
    puts("\r");
    puts("Hello, world!\n");
    return(EXIT_SUCCESS);
}