[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [Libevent-users] Forked processes and signals
- To: libevent-users@xxxxxxxxxxxxx
- Subject: Re: [Libevent-users] Forked processes and signals
- From: Nick Mathewson <nickm@xxxxxxxxxxxxx>
- Date: Fri, 4 Mar 2011 16:39:34 -0500
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: libevent-users-outgoing@xxxxxxxx
- Delivered-to: libevent-users@xxxxxxxx
- Delivery-date: Fri, 04 Mar 2011 16:39:40 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=Tnt7in0ocFrU/qHLqtlMhehmwNO55Hh4j64V43VYkP8=; b=dvV9MjDrne9TRW/vheReUU/sJfj9HpeNomSFIHZo9Qfydnu1HglmcmYqH5FJzsbgXb hPKIARGnUD1w0HCi9xYdNqzEOhNbcuaaEjnmNbnx/mPUt1irMMf6cjne8UNXYc+taO9D qWJTzLJwLfSD6SP3ux+p7uzFeKc02dwj7ELOo=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; b=Vqtp452yLyMZFgN8fZn8Dd50+9/buSxvZZU4GV1VdNrucu/+Or5pQQ3T0sz5EHSdQ5 cgm97nKlOFyp9P39lPY5A2hc+IcttVxv9RR4CQNy5xKOqlmCMTTBER8yWtqLwN1YmC+X a7jZIDGeaMus0aAFcFrTk5lehzGeWZBHOpHMA=
- In-reply-to: <4D70C446.3090501@xxxxxx>
- References: <4D70C446.3090501@xxxxxx>
- Reply-to: libevent-users@xxxxxxxxxxxxx
- Sender: owner-libevent-users@xxxxxxxxxxxxx
On Fri, Mar 4, 2011 at 5:51 AM, Christophe Fillot <cf@xxxxxx> wrote:
[...]
> I tried to use event_reinit() and/or event_base_free() on the master ev_base
> in the child processes but this seems to break the loop in the master
> process.
In theory, this approach is supposed to work: what problems are you
seeing in the master process? (event_base_free sounds like what you
want if you do not want to use the original event_base in the
subprocess. )
If I understand right, you start with a master process with an
event_base with some signal events pending in it. Then you fork, and
create new event_bases in the subprocesses, and you want to add
signals to them instead. Given that (IIUC) you do not plan to use the
original event_base in the subprocesses, so it should be okay to free
it.
Of course, if this isn't working for you, then something has gone
wrong. What failure mode have you found when you try to do this?
--
Nick
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.