>>>>> "Alan" == Alan Post <[email protected]> writes:

The value 1024 in the for loop closing all of the >=3 file
> descriptors should be determined through calling getrlimit with the
> RLIMIT_NOFILE parameter.  And if you're being extra careful, take the
> min of 3 and the value getrlimit returns for you initial condition on
> that loop, to prevent integer overflow while looping.  ;-)

Didn't I say it's ugly :) This is what happens when programming via
trial&error :)   

Hopefully there are less problems with the 3-line version I just posted.

cheers,

David
-- 
GnuPG public key: http://user.cs.tu-berlin.de/~dvdkhlng/dk.gpg
Fingerprint: B17A DC95 D293 657B 4205  D016 7DEF 5323 C174 7D40

Attachment: pgp0XGfdNBLcP.pgp
Description: PGP signature

_______________________________________________
Qi Hardware Discussion List
Mail to list (members only): [email protected]
Subscribe or Unsubscribe: 
http://lists.en.qi-hardware.com/mailman/listinfo/discussion

Reply via email to