[CUWiN-Dev] heads up: patch for hslsd on netbsd-current
David Young
dyoung at pobox.com
Mon Jun 6 15:46:08 CDT 2005
I believe this will fix hslsd on -current for CNT.
Dave
On Mon, Jun 06, 2005 at 03:38:43PM -0500, dyoung at cuw.ojctech.com wrote:
> Author: dyoung
> Date: 2005-06-06 15:38:43 -0500 (Mon, 06 Jun 2005)
> New Revision: 3288
>
> Modified:
> cuw/trunk/src/hsls/main.c
> Log:
> Major overhaul to fix some bugs in my event(3) use. Essentially,
> I have postponed initializing event(3) with event_init() until
> after I call daemon(), and I have postponed calling most HSLS routines
> until after I call event_init().
>
> daemon() forks. I have to wait until *after* forking to call
> event_init(), because it may create a kqueue. A kqueue is not
> inherited by child processes. What used to happen is that event_init()
> in the parent gets a descriptor from kqueue---descriptor 3, say---and
> then the child process gets a new descriptor from open(2) or
> socket(2)---also descriptor 3. Because event(3) is oblivious to
> forks, it invokes kevent(2) on descriptor 3. kevent(2) returns -1,
> and it sets errno to EBADF (Bad file descriptor).
>
>
>
>
> _______________________________________________
> CU-Wireless-Commits mailing list
> CU-Wireless-Commits at cuwireless.net
> http://lists.chambana.net/cgi-bin/listinfo/cu-wireless-commits
--
David Young OJC Technologies
dyoung at ojctech.com Urbana, IL * (217) 278-3933
More information about the CU-Wireless-Dev
mailing list