Re: SO_SETFIB socket option

2011-02-13 Thread Naveen Gujje
On Sun, Feb 13, 2011 at 2:20 AM, Julian Elischer wrote: > On 2/12/11 8:40 AM, Daniel Eischen wrote: > >> On Sat, 12 Feb 2011, Naveen Gujje wrote: >> >> Hi All, >>> >>> On my FreeBSD 7.2 box, I've two routing tables (FIBs). Fib 0 and Fib 1 >>

SO_SETFIB socket option

2011-02-12 Thread Naveen Gujje
Hi All, On my FreeBSD 7.2 box, I've two routing tables (FIBs). Fib 0 and Fib 1 (net.fibs = 2). I have a simple echo client which is the counterpart of an echo server running somewhere. If I run this echo client against fib 0 as 'setfib 0 ./echo-client', it properly uses Fib 0. But, if I run this

Re: System() returning ECHILD error on FreeBSD 7.2

2010-02-11 Thread Naveen Gujje
On Thu, Feb 11, 2010 at 3:06 AM, Jilles Tjoelker wrote: > On Wed, Feb 10, 2010 at 12:44:57PM +0530, Naveen Gujje wrote: > > [SIGCHLD handler that calls waitpid()] > > > And, in some other part of the code, we call system() to add an ethernet > > interface. This system() c

Re: System() returning ECHILD error on FreeBSD 7.2

2010-02-10 Thread Naveen Gujje
> > Since we block SIGCHLD signal in system(3) till we return from wait4(), i think there is no way in which SIGCHLD handler gets invoked? Am I correct or Am I missing something? If I do the following then I don't see any problem oldsa = s

Re: System() returning ECHILD error on FreeBSD 7.2

2010-02-10 Thread Naveen Gujje
Naveen Gujje http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>> wrote: >> signal(SIGCHLD, SigChildHandler); >> >> void >> SigChildHandler(int sig) >> { >> pid_t pid; >> >> /* get status of all dead procs */ >> do

System() returning ECHILD error on FreeBSD 7.2

2010-02-09 Thread Naveen Gujje
Hi, We have a web proxy (running on FreeBSD 7.2-RELEASE-p2), where we register the SIGCHLD handler as follows: signal(SIGCHLD, SigChildHandler); void SigChildHandler(int sig) { pid_t pid; /* get status of all dead procs */ do { int procstat; pid = waitpid(-1, &procstat, WNOHANG);