csdr/ddcd.h

33 lines
577 B
C
Raw Permalink Normal View History

#pragma once
#include <signal.h>
#include <stdio.h>
#include <getopt.h>
#include <string.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <iostream>
#include <vector>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/wait.h>
typedef struct client_s
{
struct sockaddr_in addr;
int socket;
pid_t pid;
int pipefd[2];
int error;
} client_t;
2015-11-04 20:31:47 +08:00
void client();
void error_exit(const char* why);
void print_client(client_t* client, const char* what);
int proc_exists(pid_t pid);