From owner-freebsd-questions  Wed Oct  8 23:32:32 1997
Return-Path: <owner-freebsd-questions>
Received: (from root@localhost)
          by hub.freebsd.org (8.8.7/8.8.7) id XAA12123
          for questions-outgoing; Wed, 8 Oct 1997 23:32:32 -0700 (PDT)
          (envelope-from owner-freebsd-questions)
Received: from freebie.lemis.com (gregl1.lnk.telstra.net [139.130.136.133])
          by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id XAA12117
          for <questions@FreeBSD.org>; Wed, 8 Oct 1997 23:32:28 -0700 (PDT)
          (envelope-from grog@freebie.lemis.com)
Received: (from grog@localhost)
	by freebie.lemis.com (8.8.7/8.8.5) id QAA12751;
	Thu, 9 Oct 1997 16:02:17 +0930 (CST)
Message-ID: <19971009160216.09286@lemis.com>
Date: Thu, 9 Oct 1997 16:02:16 +0930
From: Greg Lehey <grog@lemis.com>
To: xiyuan qian <xiyuan@npc.haplink.com.cn>
Cc: FreeBSD Questions <questions@FreeBSD.org>
Subject: Re: maximum file descriptors?
References: <199710091433.OAA19072@npc.haplink.com.cn>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 0.84e
In-Reply-To: <199710091433.OAA19072@npc.haplink.com.cn>; from xiyuan qian on Thu, Oct 09, 1997 at 02:33:07PM +0000
Organisation: LEMIS, PO Box 460, Echunga SA 5153, Australia
Phone: +61-8-8388-8250
Fax: +61-8-8388-8250
Mobile: +61-41-739-7062
WWW-Home-Page: http://www.lemis.com/~grog
Fight-Spam-Now: http://www.cauce.org
Sender: owner-freebsd-questions@FreeBSD.org
X-Loop: FreeBSD.org
Precedence: bulk

On Thu, Oct 09, 1997 at 02:33:07PM +0000, xiyuan qian wrote:
>>
>> On Thu, Oct 09, 1997 at 01:37:52PM +0000, xiyuan qian wrote:
>>> Hi, Here I have a MUD game running on FreeBSD, when there are more than 59
>>> users connected in, it will get an error message with appending to a log
>>> file. The source code is as followings:
>>>
>>> if (( fopen(fname,"a") == NULL){
>>>   fprintf(stderr,"Error opening logfile\n")
>>> }
>>
>> What's the error message?
>>
>
> The error message is:
>   Error opening logfile

Hmmm, I suppose I asked for that one :-)  But it would be nicer if you
could state the message rather than quoting source code.

Try ulimit:

  ulimit -n 100

This should give you 100 open descriptors.  ulimit -a will probably
show that you have only 64 at the moment.

Alternatively, take a look at the man page for login.conf for a way of
setting the values from login.

Greg