* 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 session.c) > > and "pipe_s2r[2]" is passed to > > pid_t rde_main(int pipe_m2r[2], int pipe_s2r[2], int pipe_m2s[2], int > pipe_s2rctl[2], int debug) > (in rde.c) > > It seems the only usage in both these functions is a close() call. > > What is the point of passing the parameters ? I thought it would be > close()'d from main() in bgpd.c.
well, rde_main and session_main fork()... -- Henning Brauer, h...@bsws.de, henn...@openbsd.org BS Web Services GmbH, http://bsws.de, Full-Service ISP Secure Hosting, Mail and DNS Services. Dedicated Servers, Root to Fully Managed Henning Brauer Consulting, http://henningbrauer.com/