diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2016-05-29 20:52:17 -0400 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2016-05-29 20:52:17 -0400 |
| commit | 15fcc190319a3deaaeaa544833ea07475e790585 (patch) | |
| tree | 25b9ad86998682bb0d270521ef9efa00c0047d8a /main.c | |
| parent | 785ac61778829e572556f4c9f40026e6b624e81e (diff) | |
| download | webpage-15fcc190319a3deaaeaa544833ea07475e790585.tar.gz webpage-15fcc190319a3deaaeaa544833ea07475e790585.tar.bz2 webpage-15fcc190319a3deaaeaa544833ea07475e790585.zip | |
re-synching
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 37 |
1 files changed, 0 insertions, 37 deletions
@@ -1,37 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <stdlib.h> -#include <stdint.h> -#include "common.c" - -int main(){ - char* data = getenv("QUERY_STRING"); - char* hardip = getenv("REMOTE_ADDR"); - printf("%s%c%c\n", - "Content-Type:text/html;charset=iso-8859-1",13,10); - printf("Data:%s",data); -} - -void addConnected(int32_t ipaddr){ - char* shm; - int shmid; - /* - //Create the segment. - if ((shmid = shmget(key, SHMSZ, IPC_CREAT | 0666)) < 0) { - perror("shmget"); - exit(1); - } - - //Now we attach the segment to our data space. - if ((shm = shmat(shmid, NULL, 0)) == (char *) -1) { - perror("shmat"); - exit(1); - } - - /* - * If there's another process that got there first - * Wait for it to finish loading data before we start - */ - while (*shm != '*') - sleep(1); -} |
