about summary refs log tree commit diff stats
path: root/helloworld.c.txt
diff options
context:
space:
mode:
authorahriman <gbenjaminmorrison@gmail.com>2018-11-23 16:09:08 -0500
committerahriman <gbenjaminmorrison@gmail.com>2018-11-23 16:09:08 -0500
commit7ea5757237193ed923b5f5c508237bb36f47affa (patch)
treef330d17a5a1ab2eec770159ba8ffb8c1991e6838 /helloworld.c.txt
parent25d232184b8f22d224e97a87a4827857f21ed7e7 (diff)
downloadsite-7ea5757237193ed923b5f5c508237bb36f47affa.tar.gz
Upload files to ''
Diffstat (limited to 'helloworld.c.txt')
-rw-r--r--helloworld.c.txt16
1 files changed, 16 insertions, 0 deletions
diff --git a/helloworld.c.txt b/helloworld.c.txt
new file mode 100644
index 0000000..fcae386
--- /dev/null
+++ b/helloworld.c.txt
@@ -0,0 +1,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);
+}