Arc Forumnew | comments | leaders | submitlogin
Anyone know if they fixed the file descriptor leak in recent versions of Mzscheme?
7 points by pg 5697 days ago | 2 comments
In the version of Mzscheme we've been using there is no way to close a port with buffered output. This is a problem for an http server because a client that stops responding could leave you with a port that has buffered output. Since each port takes up a file descriptor, you end up with a file descriptor leak. You eventually run out and the server gets wedged.

Does anyone know if this got fixed in recent versions of MzScheme? Rtm cooked up a workaround using "custodians" but we'd rather not release code so ugly.



1 point by elibarzilay 5694 days ago | link

Well, custodians are not really a workaround -- they're intended just for situations where you want to close up all resources that belong to a server thread, for example.

But in any case, I don't know about such a leak... AFAIK, if you're closing the port, then everything should work properly. Is there some example code that shows the problem? (Better to mail me, btw, since keeping track of this thing is difficult and there's no email alerts...)

-----

1 point by pg 5693 days ago | link

We're ok now. Rtm figured out how to get the custodian stuff down into ac.scm, so in Arc code this stuff "just works."

-----