|
|
|
@ -170,24 +170,13 @@ static void sigpipe_handler(int a)
|
|
|
|
|
|
|
|
|
|
int main(int argc, char **argv)
|
|
|
|
|
{
|
|
|
|
|
// set detailed signal handler
|
|
|
|
|
// struct sigaction sigact, sigpipe;
|
|
|
|
|
// sigact.sa_flags = SA_SIGINFO;
|
|
|
|
|
// sigact.sa_sigaction = signal_error;
|
|
|
|
|
// sigemptyset(&sigact.sa_mask);
|
|
|
|
|
// sigaction(SIGFPE, &sigact, 0);
|
|
|
|
|
// sigaction(SIGILL, &sigact, 0);
|
|
|
|
|
// sigaction(SIGSEGV, &sigact, 0);
|
|
|
|
|
// sigaction(SIGBUS, &sigact, 0);
|
|
|
|
|
|
|
|
|
|
// memset(&sigpipe, 0, sizeof(struct sigaction));
|
|
|
|
|
// sigpipe.sa_handler = sigpipe_handler;
|
|
|
|
|
// sigaction(SIGPIPE, &sigpipe, NULL);
|
|
|
|
|
char *rootca = NULL, *cert = NULL;
|
|
|
|
|
conn_sys_t *ssys = connections_create();
|
|
|
|
|
int port = DEFAULT_PORT;
|
|
|
|
|
int opt;
|
|
|
|
|
|
|
|
|
|
signal(SIGPIPE, SIG_IGN);
|
|
|
|
|
|
|
|
|
|
while((opt = getopt(argc, argv, "p:r:u:")) != -1) {
|
|
|
|
|
switch(opt) {
|
|
|
|
|
case 'p':
|
|
|
|
|