[comp.sys.mac.programmer] Errror -42

al1f+@andrew.cmu.edu (Andy A. Lee) (10/23/89)

Hello,

     Lately I've been getting error -42 (Too Many Files Open) with my Mac II.
For the light of me, I can't figure out why.  I have a Macintosh II, 5MB Ram,
380 Meg HD with 7 partitions, Apple Color and Nutmeg 19 Monitor, and System
6.0.3.  Can I increase the number of open file allowed?

* Andy Lee *

+----------------------------+------------------------------------------------+
| Andy A. Lee  (412)268-4189 | " We all choose to compromise                  |
| ARPA: al1f+@andrew.cmu.edu |   We kill our skills we robotize               |
| BITNET: al1f%andrew@CMCCVB |   Acid waste draws kids and flies              |
| CompuServe: 72250,240      |   And diamonds turn to granite                 |
| Carnegie Mellon University |   Number one, money buys anything anytime... " |
| Pittsburgh, Pennsylvania   |                       - Kim Carnes/Donna Weiss |
+----------------------------+------------------------------------------------+

consp21@bingsund.cc.binghamton.edu (Ken Hoover) (10/24/89)

In article <0ZEYGSy00WB84AtUhr@andrew.cmu.edu>, al1f+@andrew.cmu.edu
(Andy A. Lee) writes:
> Hello,
> 
>      Lately I've been getting error -42 (Too Many Files Open) with my Mac II.
> For the light of me, I can't figure out why.  I have a Macintosh II, 5MB Ram,
> 380 Meg HD with 7 partitions, Apple Color and Nutmeg 19 Monitor, and System
> 6.0.3.  Can I increase the number of open file allowed?
> 
> * Andy Lee *

	Are you running MultiFinder?  The number of files a Mac II can have
open is dependent on available memory, among other things.  Multifinder makes
it easy to have lots more files open than you think you do.

							- Ken


------------------------------------------------------------------------------
Ken Hoover [ consp21@bingsuns.pod.binghamton.edu | consp21@bingvaxa.BITNET ]
     Resident computer jock and Mac hacker, SUNY-Binghamton Bio dept.
     Senior undergraduate consultant, SUNY-Binghamton Computer Center
------------------------------------------------------------------------------

han@apple.COM (Byron Han, Project Scapegoat) (10/24/89)

> In article <0ZEYGSy00WB84AtUhr@andrew.cmu.edu>, al1f+@andrew.cmu.edu
> (Andy A. Lee) writes:
> >      Lately I've been getting error -42 (Too Many Files Open) with my 
Mac II.
> >  Can I increase the number of open file allowed?
> > 
Suitcase II will allow the user to change the # of open files under Power 
User Settings.




+--------------------------------------------------------------------------
---+
| Disclaimer: Apple has no connection with my postings.                    
   |
+--------------------------------------------------------------------------
---+
Byron Han, CommToolbox Scapegoat      "DeAnza 3 - R.I.P. - 10/17/89 5:04PM"
Apple Computer, Inc.                  
-----------------------------------------
20525 Mariani Ave, MS 27Y             Internet: han@apple.COM
Cupertino, CA 95014                   UUCP:{sun,voder,nsc,decwrl}!apple!han
------------------------------------  GENIE:BYRONHAN   
CompuServe:72167,1664
ATTnet: 408-974-6450                  Applelink:HAN1   
HAN1@applelink.apple.COM
---------------------------------------------------------------------------
---

jeffs@tekcrl.LABS.TEK.COM (Jeff Staley) (10/24/89)

In article <0ZEYGSy00WB84AtUhr@andrew.cmu.edu> al1f+@andrew.cmu.edu (Andy A. Lee) writes:
>Hello,
>
>     Lately I've been getting error -42 (Too Many Files Open) with my Mac II.
>For the light of me, I can't figure out why.  I have a Macintosh II, 5MB Ram,
>380 Meg HD with 7 partitions, Apple Color and Nutmeg 19 Monitor, and System
>6.0.3.  Can I increase the number of open file allowed?

I recently encountered this problem too.  Fortunately, there is an easy
solution.  You can change the number of allowable open files by
modifying a parameter on your boot blocks.  Most low-level disk editors will
allow you to do this.  I used the SUM editor, but I imagine that ones like
FEdit and MacSnoop would work too.

Jeff

------------------
Usenet:	    [ucbvax,decvax,allegra,uw-beaver,hplabs]!tektronix!tekcrl!jeffs
ARPA:	    jeffs@crl.labs.tek.com
US Mail:    Jeffrey L. Staley, Computer Research Lab, Tektronix, Inc.  
                Box 500  MS 50-662, Beaverton OR 97077
Phone:	    503-627-2631  

siegel@endor.harvard.edu (Rich Siegel) (10/24/89)

In article <4838@internal.Apple.COM> han@apple.COM (Byron Han, Project Scapegoat) writes:
>
>> In article <0ZEYGSy00WB84AtUhr@andrew.cmu.edu>, al1f+@andrew.cmu.edu
>> (Andy A. Lee) writes:
>> >      Lately I've been getting error -42 (Too Many Files Open) with my 
>Mac II.
>> >  Can I increase the number of open file allowed?
>> > 

	Each mounted volume carries an overhead of three open files:
catalog and extents B-Tree files, and the DeskTop file. If you're using the
DeskTop manager, then there will be the Desktop DB and Desktop DF files
instead of the original Desktop file, making it four files per mounted
volume.

	Then if you use a program which keeps a document open for the
duration you're working on it, such as a THINK C/Pascal project, or MPW.
You'll run into the limit very quickly.

	As Byron points out, SuitCase II has a setting to allow
more open files; nevertheless, you may wish to consider the root causes:
lots of partitions, Desktop Manager, or applications which maintain open
files, and take steps to correct them.

R.




~~~~~~~~~~~~~~~
 Rich Siegel
 Staff Software Developer
 Symantec Corporation, Language Products Group
 Internet: siegel@endor.harvard.edu
 UUCP: ..harvard!endor!siegel

"There is no personal problem which cannot be solved by sufficient
application of high explosives."

~~~~~~~~~~~~~~~

kent@sunfs3.camex.uucp (Kent Borg) (10/26/89)

In article <0ZEYGSy00WB84AtUhr@andrew.cmu.edu> al1f+@andrew.cmu.edu (Andy A. Lee) writes:
>Hello,
>
>     Lately I've been getting error -42 (Too Many Files Open) with my Mac II.
>For the light of me, I can't figure out why.  I have a Macintosh II, 5MB Ram,
>380 Meg HD with 7 partitions, Apple Color and Nutmeg 19 Monitor, and System
>6.0.3.  Can I increase the number of open file allowed?

The easiest way is to use Suitcase II.  Open Suitcase, push the
"Settings..." button, then the "`Power User' Settings..." button.  You
will see a number there.  Mine is set at 40.  You only need to do this
once, so you could use someone else's Suitcase--while they are *not*
using it, be legal please.

Alternatively, I know that the old FEdit 3.21 has an "Edit Boot
Blocks" item under the "File" menu, where you can change the maximum
number of open files.  It seems that the number is at offset 0x7b
(3-bytes after the "e" at the end of "Clipboard File"), so if you are
quite brave you could also use MacSnoop instead.  For another choice,
try Symantec Tools in the SUM package, it has an "Edit Boot Blocks"
menu item too.  (Come to think of it, isn't that where FEdit went, to
MacZap then to SUM?)

Warning: Suitcase is the only simple solution I know.  All the others
are dangerious programs which can alter *any* data on your disk,
possibly blowing it away completely.  Be sure you feel comfortable
with these risks before preceeding.  You might want to wait until
people get a chance to flame any stupidities in this posting.


-- 
Kent Borg				"Wouldn't it be fun not to be famous?
kent@lloyd.uucp				 Wouldn't it be fun not to be rich?"
or					     -Cole Porter lyric (from Aladdin)
...!husc6!lloyd!kent