Probems opening /dev/tty when running from gmenu2x

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

>>>>> "Alan" == Alan Post <alanpost at> 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.


GnuPG public key:
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: <>

More information about the discussion mailing list