Re: bgpd/session.c+rde.c code explanation

2014-05-06 Thread Henning Brauer
* Denis Fondras open...@ledeuns.net [2014-05-05 20:26]: I am hacking around OpenBGPd and there is a portion of code I can't quite understand. I wonder why pipe_m2r[2] is passed as a parameter to pid_t session_main(int pipe_m2s[2], int pipe_s2r[2], int pipe_m2r[2], int pipe_s2rctl[2]) (in

Re: bgpd/session.c+rde.c code explanation

2014-05-06 Thread Denis Fondras
well, rde_main and session_main fork()... While I'm at it, I can't see where conf = calloc(1, sizeof(struct bgpd_config)) is free()'d. Denis

Re: bgpd/session.c+rde.c code explanation

2014-05-06 Thread Henning Brauer
* Denis Fondras open...@ledeuns.net [2014-05-06 10:12]: well, rde_main and session_main fork()... While I'm at it, I can't see where conf = calloc(1, sizeof(struct bgpd_config)) is free()'d. please, if you want to help, be MUCH more precise (and get clear on what side of the fork() we are).

Re: bgpd/session.c+rde.c code explanation

2014-05-06 Thread Denis Fondras
please, if you want to help, be MUCH more precise (and get clear on what side of the fork() we are). With a report like that I had to go through large parts of code to ecventually maybe spot what you are referring to. That doesn't help, that just costs time. I appreciate the effort, but

Re: bgpd/session.c+rde.c code explanation

2014-05-06 Thread Jérémie Courrèges-Anglas
Denis Fondras open...@ledeuns.net writes: please, if you want to help, be MUCH more precise (and get clear on what side of the fork() we are). With a report like that I had to go through large parts of code to ecventually maybe spot what you are referring to. That doesn't help, that just

Re: bgpd/session.c+rde.c code explanation

2014-05-06 Thread Denis Fondras
By the OS, which cleans up after the process exits. If it wasn't that way, we'd all have a much shorter uptime... Thank you Jérémie :) I had not considered it as I can see ... free(ibuf_rde); ... free(ibuf_main); ... at the end of session_main() in session.c. Denis

Re: bgpd/session.c+rde.c code explanation

2014-05-06 Thread Jérémie Courrèges-Anglas
Denis Fondras open...@ledeuns.net writes: By the OS, which cleans up after the process exits. If it wasn't that way, we'd all have a much shorter uptime... Thank you Jérémie :) I had not considered it as I can see ... free(ibuf_rde); ... free(ibuf_main); ... at the end of

Re: bgpd/session.c+rde.c code explanation

2014-05-06 Thread Claudio Jeker
On Tue, May 06, 2014 at 01:45:57PM +0200, Denis Fondras wrote: please, if you want to help, be MUCH more precise (and get clear on what side of the fork() we are). With a report like that I had to go through large parts of code to ecventually maybe spot what you are referring to. That

Re: bgpd/session.c+rde.c code explanation

2014-05-06 Thread Claudio Jeker
On Tue, May 06, 2014 at 02:49:00PM +0200, Denis Fondras wrote: By the OS, which cleans up after the process exits. If it wasn't that way, we'd all have a much shorter uptime... Thank you Jérémie :) I had not considered it as I can see ... free(ibuf_rde); ... free(ibuf_main); ...

Re: bgpd/session.c+rde.c code explanation

2014-05-06 Thread Claudio Jeker
On Tue, May 06, 2014 at 03:32:06PM +0200, Jérémie Courrèges-Anglas wrote: Denis Fondras open...@ledeuns.net writes: By the OS, which cleans up after the process exits. If it wasn't that way, we'd all have a much shorter uptime... Thank you Jérémie :) I had not considered it as I

Re: bgpd/session.c+rde.c code explanation

2014-05-06 Thread Henning Brauer
* Denis Fondras open...@ledeuns.net [2014-05-06 14:49]: By the OS, which cleans up after the process exits. If it wasn't that way, we'd all have a much shorter uptime... Thank you Jérémie :) I had not considered it as I can see ... free(ibuf_rde); ... free(ibuf_main); ... at the

Re: bgpd/session.c+rde.c code explanation

2014-05-06 Thread Jérémie Courrèges-Anglas
Claudio Jeker cje...@diehard.n-r-g.com writes: On Tue, May 06, 2014 at 03:32:06PM +0200, Jérémie Courrèges-Anglas wrote: Denis Fondras open...@ledeuns.net writes: By the OS, which cleans up after the process exits. If it wasn't that way, we'd all have a much shorter uptime...

Re: bgpd/session.c+rde.c code explanation

2014-05-06 Thread Henning Brauer
* Claudio Jeker cje...@diehard.n-r-g.com [2014-05-06 17:41]: This was done to be able to spot memory leaks on shutdown. Not used that part of the code in a long time. Maybe it is time to remove this bad habit. nah, being able to apply leakfinder.shar to find memleaks is still valuable. yes,

bgpd/session.c+rde.c code explanation

2014-05-05 Thread Denis Fondras
Hello all, I am hacking around OpenBGPd and there is a portion of code I can't quite understand. I wonder why pipe_m2r[2] is passed as a parameter to pid_t session_main(int pipe_m2s[2], int pipe_s2r[2], int pipe_m2r[2], int pipe_s2rctl[2]) (in session.c) and pipe_s2r[2] is passed to pid_t

Re: bgpd/session.c+rde.c code explanation

2014-05-05 Thread Stefan Sperling
On Mon, May 05, 2014 at 08:25:23PM +0200, Denis Fondras wrote: Hello all, I am hacking around OpenBGPd and there is a portion of code I can't quite understand. I wonder why pipe_m2r[2] is passed as a parameter to pid_t session_main(int pipe_m2s[2], int pipe_s2r[2], int pipe_m2r[2], int

Re: bgpd/session.c+rde.c code explanation

2014-05-05 Thread Denis Fondras
Le 05/05/2014 20:35, Stefan Sperling a écrit : Take a look at what fork() does with file descriptors. Thank you Stefan, that's now crystal clear. Denis