* On 2008-08-05 Nicolas Montgermont <nicolas_montgermont@yahoo.fr> wrote :
Hi Claude adn list,
Back again with my spelling function written in lua. I've got a problem
in the terminal sometimes (pretty often in fact) :
error: lua: error in dispatcher:
[string "lspell"]:13: echo fhdkq | /sw/bin/ispell -a | grep \\*: Too
many open files
when using my object "lspell.pd_lua", feeding the inlet with [symbol
fhdkq( for example.
When this error appears the object is not working. This error occurs in
groups : appearing for 5-20 seconds and disappearing for 10 - 60 seconds.
What exactly is this error?
You are not closing the pipe explicitly, and this causes a big pile of
open file descriptors. Because the file descriptor is no longer
referenced as it leaves the scope of your function, the garbage
collector eventually comes along and collects the fd, closing the pipe
on the fly.
The proper solution is to close the pipe when you're done, using
p:close()