[Wifidog] Why WiFiDog Crashes

Philippe April papril777 at yahoo.com
Sat May 15 17:43:01 EDT 2004


Great, thanks Tony, very good to know.

I found a couple of webpages and found out it's most likely not available
on FreeBSD and other OSes (ie. Solaris, not that we care).

So maybe on Linux we can flag MSG_NOSIGNAL, but just ignore the signal
on FreeBSD.

Of course WiFiDog won't work for now on FreeBSD because it lacks all the
firewall aspect and all, but we should aim to make it portable.. :)

I'll leave it on ignore for now.

On Sat, May 15, 2004 at 05:21:11PM -0400, Tony Bussieres wrote:
> I once had the same problem, and the "clean" way to deal with it is to
> put the flag  MSG_NOSIGNAL on your write call...
> 
> here's an extract of "man 7 socket"
> 
> ...
> SIGNALS
> 
> When  writing onto a connection-oriented socket that has been shut down
> (by the local or the remote end) SIGPIPE is sent to the writing process
> and  EPIPE  is  returned.   The  signal is not sent when the write call
> specified the MSG_NOSIGNAL flag.
> ...                                                                                
> 
> You can check the errno to check if your write call worked properly, if
> you have a EPIPE, you can clean up your connection.
> 
> 
> Tony
> 
> 
> 
> On Fri, 2004-05-14 at 23:37, Philippe April wrote:
> > Turns out I was partially wrong.. Found out a SIGPIPE is sent when
> > write() returns "broken pipe", and WiFiDog would just quit. It's much
> > harder to debug when don't have all the tools to debug.
> > 
> > I don't know if it's the proper way to handle it, but I just used the
> > same handler that we have for SIGCHLD to trap SIGPIPE, which does ...
> > nothing about it. Works great!
> > 
> > It should be much more stable now, I'll let it run and see.
> > 
> > Whew! Glad I found that bug, it was so annoying.
> > 
> > Everybody have a great week-end,
> -- 
> May Linux be with you!
> 
> 

> _______________________________________________
> Wifidog mailing list
> Wifidog at isf.waglo.com
> http://isf.waglo.com/mailman/listinfo/wifidog_isf.waglo.com


-- 
Philippe April
papril777 at yahoo.com
GnuPG: http://key.philippeapril.com/

-------------- next part --------------
_______________________________________________
Wifidog mailing list
Wifidog at isf.waglo.com
http://isf.waglo.com/mailman/listinfo/wifidog_isf.waglo.com


More information about the Wifidog mailing list