[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GC and file descriptors (and external resources.in general, I guess)
From: |
Gary Houston |
Subject: |
Re: GC and file descriptors (and external resources.in general, I guess) |
Date: |
1 Nov 2000 00:09:55 -0000 |
> From: Michael Livshin <address@hidden>
> Date: 31 Oct 2000 20:17:44 +0200
> hello everybody.
>
> currently, if a call to `open' or `opendir' fails, Guile throws an
> error.
>
> what it *should* do, IMHO, is try to GC first, since it is likely to
> free some file descriptors.
>
> so, well, is there any reason why this isn't done? if there's no good
> reason, I'll add this functionality.
There was a short discussion of this years ago. I was going to say
nobody got around to implementing it, but this is from SCM:
1998-11-11 Radey Shouman <address@hidden>
* scmfig.h (SCM_INTERRUPTED): Abstracted the interrupted test from
SYSCALL.
(SCM_OPENCALL): Similar to SYSCALL, but will gc to reclaim
file descriptors.
* sys.c (try_open_file): Now uses SCM_OPENCALL.
(gc_for_open_files): Added.
* ioext.c:
* posix.c:
* socket.c: File opening system calls now use SCM_OPENCALL.
If an open fails because there are no unused file handles, GC for
for file handles.