RE: select(2) breakage

1999-06-14 Thread Ladavac Marino
> -Original Message- > From: Dag-Erling Smorgrav [SMTP:d...@flood.ping.uio.no] > Sent: Sunday, June 13, 1999 6:02 PM > To: Brian Feldman > Cc: Dag-Erling Smorgrav; hack...@freebsd.org > Subject: Re: select(2) breakage > [ML] To the previous post

Re: select(2) breakage

1999-06-13 Thread Dag-Erling Smorgrav
Brian Feldman writes: > On 13 Jun 1999, Dag-Erling Smorgrav wrote: > > BTW, you should check for errno == EINTR when select() returns -1. > The perror() is the status report for select() when -1. Yeah, but EINTR is a normal condition, so I'd ignore it silently instead of logging it. Of course, th

Re: select(2) breakage

1999-06-13 Thread Dag-Erling Smorgrav
Dag-Erling Smorgrav writes: > This still doesn't explain select()'s failure to time out Found it! If you change: printf("no select() action"); to: fprintf(stderr, "no select() action\n"); you'll see that select() does time out. The moral of this story is to always use an unbuffe

Re: select(2) breakage

1999-06-13 Thread Brian Feldman
On 13 Jun 1999, Dag-Erling Smorgrav wrote: > Brian Feldman writes: > > On 13 Jun 1999, Dag-Erling Smorgrav wrote: > > > connect() normally uses the 1024-5000 range. Try the following: > > > > > > # sysctl -w net.inet.ip.portrange.last=4 > > > > > > and see if it solves the EAGAIN problem. >

Re: select(2) breakage

1999-06-13 Thread Dag-Erling Smorgrav
Brian Feldman writes: > On 13 Jun 1999, Dag-Erling Smorgrav wrote: > > connect() normally uses the 1024-5000 range. Try the following: > > > > # sysctl -w net.inet.ip.portrange.last=4 > > > > and see if it solves the EAGAIN problem. > > Actually, this is the perfect explanation. I think tha

Re: select(2) breakage

1999-06-13 Thread Brian Feldman
On 13 Jun 1999, Dag-Erling Smorgrav wrote: > Brian Feldman writes: > > Another problem that came up with this: I originally started at port 1024. > > I monopolized 3 ports (almost all consecutive, of course). When I try to > > connect() a TCP socket as non-root, it fails with EAGAIN (I only

Re: select(2) breakage

1999-06-13 Thread Dag-Erling Smorgrav
Brian Feldman writes: > Another problem that came up with this: I originally started at port 1024. > I monopolized 3 ports (almost all consecutive, of course). When I try to > connect() a TCP socket as non-root, it fails with EAGAIN (I only tracked it > far enough down as in_pcbbind().) It s

Just connect(2) breakage (Was Re: select(2) breakage)

1999-06-12 Thread Brian Feldman
On Sun, 13 Jun 1999, Brian Feldman wrote: > I'm using the attached program which I wrote today (don't ask why, I think > I just wanted to beat the heck out of FreeBSD!) I have maxusers 200, a > MAXFILES=65536, and the limits set to allow me to use the program > fully (all 3 ports; I don't wa