At Fri, 16 Mar 2018 13:30:07 +0100, "'Paulo Matos' via Racket Users" wrote:
> I was playing around with places and decided to try to spawn 200 places.
> [...]
> Is there anything I can do to avoid this? Which files are actually being
> created? And 200 is not a very large number...

This is a limitation of places. They're heavyweight enough that 200
ends up counting as a very large number of them.

> To my surprise this happened:
> dynamic-place: stderr pipe failed
>   system error: Too many open files; errno=24
> 
> I am actually surprised that I get an error based on dynamic-place
> instead of place*.

Yes, that's not great. But in contrast to argument errors,
resource-exhaustion errors are often difficult to tie to a suitable
source. It's a little lucky that the messages says "place" at all,
since he "too many open files" error could just as easily happen when
trying to load the place's initial code or trying to search the
filesystem for a module.

> But even more surprised that given I only open one
> open (the null) port for stdout and stderr I still get the system error.

There's no avoiding an OS-level file descriptor for each of stdin,
stdout, and stderr. Even if you supply an existing file-stream port, it
will be `dup`ed internally, and `open-output-nowhere` is not close
enough to the core for there to be a special case.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to