<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<blockquote cite="mid:47BE8ABE.4090209@g-trans.de" type="cite">
  <pre wrap="">Hi Max,
  </pre>
  <blockquote type="cite">
    <pre wrap="">That's definetely the bug. I made it out in an empirical way:

I counted the delta between two successful 'open' fd, and counted
the number of failed 'dopen' in-between. Tada! If you try to dopen
a non-directory item, you lose one fd. So that ruled out my first
solution to check whether a file was a dir ot not with 'dopen'.
  
    </pre>
  </blockquote>
  <pre wrap=""><!---->
In that case, I'd definately suggest looking into the relevant IRX's 
sources to figure out who exactly is losing those FD's and why.
As you say that it happens with all devices, I suppose the problem 
relies on the IOP side of filexio.
I was rather sure that this bug was fixed ages ago, but if you say that 
it's still present..
I'll try to look into it this weekend, but tbh, I don't think I'll 
actually have time for it</pre>
</blockquote>
Okay, I just had a look at the relevant sources.<br>
If a component is losing handles, it would be iomanx.irx<br>
However, the dopen implementation in the version I currently have on my
hdd ($Id: iomanX.c 1353 2006-09-04 06:48:12Z Herben $) looks absolutely
correct to me. (And I can't update right now, cause the ps2sdk's svn
server won't let me in for unknown reasons).<br>
Anyways, as I pointed out in an earlier mail, scummvm won't load its
own iomanx if it's being run from the host: device, because the
debugging environment on the ps2 already provides this driver. I
strongly suggest that you make sure that your ps2link (or whatever you
are using) provides a working build of iomanx.irx.<br>
If in doubt, mail me the IRX, I'll have a look at it.<br>
<br>
P.S.: Okay, the corresponding device drivers could be losing handles as
well, but you say that you run into this problem with _all_ devices.
And from what I see in the sources, at least my cdvd driver always
closes its handles correctly.<br>
<br>
Robert.<br>
</body>
</html>