11 Child(
const char* n,
const char* svc) : id(0), run(0), calls(0) {
12 ::strncpy(name,n,
sizeof(name));
18 c->
run = *(
int*)buffer;
28 memset(children,0,
sizeof(children));
50 ::printf(
"Sleep a bit to see task disappear in did\n");
52 for(
size_t i=0;
i<
sizeof(children)/
sizeof(children[0]); ++
i) {
53 char nam[132], svc[132];
59 ::printf(
"PID:%d Register Child service Child_%02d/run to DNS....\n",::getpid(),
i);
69 ::printf(
"ERROR in fork!!!! %s\n",strerror(errno));
75 ::printf(
"PID:%d RE-Register Parent to DNS....\n",::getpid());
92 ::printf(
"Process %d exiting\n",::getpid());
unsigned dic_info_service(char *serv_name, int req_type, int req_timeout, void *serv_address, int serv_size, void(*usr_routine)(), dim_long tag, void *fill_addr, int fill_size)
Child(const char *n, const char *svc)
#define dis_start_serving
#define dis_update_service
static void callback(void *tag, void *buffer, int *)
sprintf(name1,"NewService%d", i)