#include <stdio.h>
#include <unistd.h>

#include <pthread.h>
#include <signal.h>

#include "type.h"

#include "remote_process.h"
#include "http_request_list.h"

#include "cgi_request.h"

#include "client.h"

int main (int argc, char **argv)
{
    if (argc < 2)
    {
        printf ("usage: %s <executable>\n", argv[0]);
        return (2);
    }

    signal (SIGPIPE, SIG_IGN);

    client_init (atoi (argv[1]));

    http_request_list_setHandler (http_request_list_getRequestList(),
            cgi_request_handler, NULL);

    while (TRUE)
    {
        thrFsleep (60 * 1000);
    }
}

