sock_test.c revision bb039bc91ef7d5b82cdba64e0a8a965790e06700
#include "attribute.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <isc/assertions.h>
#include <isc/memcluster.h>
volatile int tasks_done = 0;
static isc_boolean_t
{
return (ISC_FALSE);
}
static isc_boolean_t
{
return (ISC_TRUE);
}
static isc_boolean_t
{
tasks_done++;
return (ISC_TRUE);
}
int
{
unsigned int workers;
struct isc_sockaddr sockaddr;
int addrlen;
addrlen = sizeof(struct sockaddr_in);
if (argc > 1)
else
workers = 2;
&so1) == ISC_R_SUCCESS);
"so1") == ISC_R_SUCCESS);
&so2) == ISC_R_SUCCESS);
sleep(2);
sizeof *event);
sizeof *event);
sizeof *event);
sizeof *event);
sizeof *event);
sizeof *event);
sizeof *event);
sizeof *event);
sizeof *event);
sizeof *event);
sizeof *event);
/*
* Grr! there is no way to say "wake me when it's over"
*/
while (tasks_done != 2) {
sleep(2);
}
printf("destroy\n");
printf("destroyed\n");
return (0);
}