Browse Source

Create unix receivers during child setup

master
Con Kolivas 9 years ago
parent
commit
31434bc0b9
  1. 3
      src/ckpool.c
  2. 1
      src/ckpool.h
  3. 2
      src/connector.c
  4. 1
      src/generator.c
  5. 2
      src/stratifier.c

3
src/ckpool.c

@ -286,7 +286,7 @@ unix_msg_t *get_unix_msg(proc_instance_t *pi)
return umsg;
}
void create_unix_receiver(proc_instance_t *pi)
static void create_unix_receiver(proc_instance_t *pi)
{
pthread_t pth;
@ -1499,6 +1499,7 @@ static void prepare_child(ckpool_t *ckp, proc_instance_t *pi, void *process, cha
pi->sockname = pi->processname;
create_process_unixsock(pi);
create_pthread(&pi->pth_process, process, pi);
create_unix_receiver(pi);
}
#ifdef USE_CKDB

1
src/ckpool.h

@ -318,7 +318,6 @@ ckmsgq_t *create_ckmsgqs(ckpool_t *ckp, const char *name, const void *func, cons
void ckmsgq_add(ckmsgq_t *ckmsgq, void *data);
bool ckmsgq_empty(ckmsgq_t *ckmsgq);
unix_msg_t *get_unix_msg(proc_instance_t *pi);
void create_unix_receiver(proc_instance_t *pi);
ckpool_t *global_ckp;

2
src/connector.c

@ -1577,8 +1577,6 @@ void *connector(void *arg)
create_pthread(&cdata->pth_receiver, receiver, cdata);
cdata->start_time = time(NULL);
create_unix_receiver(pi);
ret = connector_loop(pi, cdata);
out:
dealloc(ckp->cdata);

1
src/generator.c

@ -2915,7 +2915,6 @@ void *generator(void *arg)
gdata = ckzalloc(sizeof(gdata_t));
ckp->gdata = gdata;
gdata->ckp = ckp;
create_unix_receiver(pi);
if (ckp->proxy) {
char *buf = NULL;

2
src/stratifier.c

@ -7609,8 +7609,6 @@ void *stratifier(void *arg)
mutex_init(&sdata->share_lock);
mutex_init(&sdata->block_lock);
create_unix_receiver(pi);
LOGWARNING("%s stratifier ready", ckp->name);
stratum_loop(ckp, pi);

Loading…
Cancel
Save