*BSD News Article 5648


Return to BSD News archive

Newsgroups: comp.unix.bsd
Path: sserve!manuel!munnari.oz.au!uunet!mcsun!fuug!funic!nntp.hut.fi!vipunen.hut.fi!tlukka
From: tlukka@vipunen.hut.fi (Tuomas Lukka)
Subject: getdtablesize
Message-ID: <tlukka.717504312@vipunen.hut.fi>
Sender: usenet@nntp.hut.fi (Usenet pseudouser id)
Nntp-Posting-Host: vipunen.hut.fi
Organization: Helsinki University of Technology, Finland
Date: 26 Sep 92 10:45:12 GMT
Lines: 21

I've had a couple of programs (most notably login and screen)
crash under zsh.
With gdb, I found that the reason was that they did something like
for(i=getdtablesize(); --i>2; close(i));
and getdtablesize returned something like 2000000000 and this
naturally would take a while to run... 

Patches, solutions, comments?
I'm running on a 486,33MHz,4Mb memory.
A friend with a 386SX,16MHz,8Mb and many other people don't seem
to have these problems.

The curious thing is that when I'm root, these programs work
as expected (using csh..)...???

	TJL
-- 
 /--\  TJL -- Tuomas J. Lukka  tlukka@vipunen.hut.fi IIIIIIIII -------    Just
/-\ o\        Puistokaari 1E18  _________--------------------+    I  J     go
\o \-/        00200 Helsinki    --------I GONE FISHING AGAIN ->   I        to
 \__/  SIGh.. Finland T. +358-0-6923924 /---------------------    L___    sleep..