This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Emacs can't start-process more than 30~40 processes
Christopher Faylor <cgf-use-the-mailinglist-please@cygwin.com> writes:
> On Wed, Jul 29, 2009 at 03:32:28PM +0800, Haojun Bao wrote:
>>>
>>> Not necessarily. We don't expect these functions to return NULL. It
>>> would be interesting to know how many fds are open at this point. If it
>>> is a large number then maybe we have to start enforcing an fd max. If
>>> it is a "small" number then something is wrong and we're allocating too
>>> much of the cygheap. The cygheap was always supposed to be relatively
>>> small. Maybe we're abusing it too much in 1.7.
>>
>>There are quite some fds. In start-process, emacs will allocate 1 PTY
>>and 1 pipe for each process it starts.
>
> Yes, I assumed that there were a bunch of fds but I was looking for an
> exact number rather than "quite some". I can't give exact details about
> how to find the number now but I thought that since you were looking at
> the code it wouldn't be too hard to figure this value out.
>
Sorry. There are a total of 40 fds in one test run from
/proc/PID/fd. Seems the PTYs and pipes are allocated and released soon,
what remains are /dev/ptmx fds.
$'ls' -l /proc/5668/fd
total 0
lrwxrwxrwx 1 bhj None 0 2006-12-01 08:00 0 -> /dev/tty2
lrwxrwxrwx 1 bhj None 0 2006-12-01 08:00 1 -> /dev/tty2
lrwxrwxrwx 1 bhj None 0 2006-12-01 08:00 2 -> /dev/tty2
lrwxrwxrwx 1 bhj None 0 2006-12-01 08:00 37 -> /dev/tty36
lrwxrwxrwx 1 bhj None 0 2006-12-01 08:00 38 -> pipe:[2180]|
lrwxrwxrwx 1 bhj None 0 2006-12-01 08:00 39 -> pipe:[2232]|
...
#bhj: fd 3-36 are all opened -> /dev/ptmx
...
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple