Probems opening /dev/tty when running from gmenu2x

David Kuehling dvdkhlng at gmx.de
Sat Dec 25 12:48:03 EST 2010


>>>>> "Alan" == Alan Post <alanpost at sunflowerriver.org> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.en.qi-hardware.com/pipermail/discussion/attachments/20101225/a9524082/attachment.pgp>


More information about the discussion mailing list


interactive