Re: [Libevent-users] Can't get libevent ( event-test.c ) to work on OS X ( 10.4.8 )!

2006-10-09 Thread Scott Lamb

On Oct 9, 2006, at 11:41 AM, Niels Provos wrote:

You should really just use the code in regress.c  event-test.c is very
old.  BTW, the open O_NONBLOCK behavior is different across the
different operating systems.  This code works fine on *BSD systems.


Maybe the broken sample code could be deleted? Or would you like a  
patch to fix it? Or at least a README in the sample directory saying  
that it's old'n'busted?


--
Scott Lamb 


___
Libevent-users mailing list
Libevent-users@monkey.org
http://monkey.org/mailman/listinfo/libevent-users


Re: [Libevent-users] Can't get libevent ( event-test.c ) to work on OS X ( 10.4.8 )!

2006-10-09 Thread William Ahern
On Mon, Oct 09, 2006 at 11:41:52AM -0700, Niels Provos wrote:
> You should really just use the code in regress.c  event-test.c is very
> old.  BTW, the open O_NONBLOCK behavior is different across the
> different operating systems.  This code works fine on *BSD systems.
> 

huh. interesting. learn something new every day. i should've stuck to
testing my conclusions in code before replying. also, i didn't realize
event-test.c was *the* event-test.c from the library. that wouldn't changed
my operating assumptions a little ;)
___
Libevent-users mailing list
Libevent-users@monkey.org
http://monkey.org/mailman/listinfo/libevent-users


Re: [Libevent-users] Can't get libevent ( event-test.c ) to work on OS X ( 10.4.8 )!

2006-10-09 Thread Niels Provos

You should really just use the code in regress.c  event-test.c is very
old.  BTW, the open O_NONBLOCK behavior is different across the
different operating systems.  This code works fine on *BSD systems.

Niels.

On 10/9/06, William Ahern <[EMAIL PROTECTED]> wrote:

On Mon, Oct 09, 2006 at 01:28:52PM -0400, Jarrod Roberson wrote:
> I got it to compile under XCode, and run, but I can't get it to responde
> to any events? Here is the code.

I went through this code before but didn't have time to enumerate all the
different things wrong with it (not finish the reply). The most obvious
problem is this: open(O_NONBLOCK) doesn't do what you think it does.

open(O_NONBLOCK) on a FIFO means that the open call shouldn't block waiting
for a writer to open the other end. It DOES NOT put the resulting descriptor
into non-blocking I/O mode. You'll still need to use fcntl() for that.

- Bill
___
Libevent-users mailing list
Libevent-users@monkey.org
http://monkey.org/mailman/listinfo/libevent-users



___
Libevent-users mailing list
Libevent-users@monkey.org
http://monkey.org/mailman/listinfo/libevent-users


Re: [Libevent-users] Can't get libevent ( event-test.c ) to work on OS X ( 10.4.8 )!

2006-10-09 Thread William Ahern
On Mon, Oct 09, 2006 at 01:28:52PM -0400, Jarrod Roberson wrote:
> I got it to compile under XCode, and run, but I can't get it to responde
> to any events? Here is the code.

I went through this code before but didn't have time to enumerate all the
different things wrong with it (not finish the reply). The most obvious
problem is this: open(O_NONBLOCK) doesn't do what you think it does.

open(O_NONBLOCK) on a FIFO means that the open call shouldn't block waiting
for a writer to open the other end. It DOES NOT put the resulting descriptor
into non-blocking I/O mode. You'll still need to use fcntl() for that.

- Bill
___
Libevent-users mailing list
Libevent-users@monkey.org
http://monkey.org/mailman/listinfo/libevent-users