public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* is there a limit on how many mintty terminals can be open at once?
@ 2021-10-03 16:25 Jason Pyeron
  2021-10-03 19:58 ` Takashi Yano
  0 siblings, 1 reply; 5+ messages in thread
From: Jason Pyeron @ 2021-10-03 16:25 UTC (permalink / raw)
  To: cygwin

I got the "Error: Could not fork child process: There are no available terminals (-1)" error.

Closing N minty terminals allowed me to open exactly N more.

My google fu is poor, since I cannot seem to find relevant pages.

What is the limit?

Can the limit be configured?

$ ps -f | grep mintty | wc -l
42

$ dir /dev/ | grep pty | wc -l
46


CYGWIN_NT-10.0 hostname 3.2.0(0.340/5/3) 2021-03-29 08:42 x86_64 Cygwin

v/r,

Jason Pyeron

--
Jason Pyeron  | Architect
PD Inc        | Certified SBA 8(a)
10 w 24th St  | Certified SBA HUBZone
Baltimore, MD | CAGE Code: 1WVR6
 
.mil: jason.j.pyeron.ctr@mail.mil
.com: jpyeron@pdinc.us
tel : 202-741-9397




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: is there a limit on how many mintty terminals can be open at once?
  2021-10-03 16:25 is there a limit on how many mintty terminals can be open at once? Jason Pyeron
@ 2021-10-03 19:58 ` Takashi Yano
  2021-10-04 15:37   ` Brian Inglis
  0 siblings, 1 reply; 5+ messages in thread
From: Takashi Yano @ 2021-10-03 19:58 UTC (permalink / raw)
  To: cygwin

On Sun, 3 Oct 2021 12:25:15 -0400
"Jason Pyeron" wrote:
> I got the "Error: Could not fork child process: There are no available terminals (-1)" error.
> 
> Closing N minty terminals allowed me to open exactly N more.
> 
> My google fu is poor, since I cannot seem to find relevant pages.
> 
> What is the limit?

In current cygwin, maximum number of pty is 128.
It is hard coded and not configurable by user.
https://cygwin.com/git/?p=newlib-cygwin.git;a=blob;f=winsup/cygwin/tty.h#l15


-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: is there a limit on how many mintty terminals can be open at once?
  2021-10-03 19:58 ` Takashi Yano
@ 2021-10-04 15:37   ` Brian Inglis
  2021-10-04 19:51     ` Andrey Repin
  0 siblings, 1 reply; 5+ messages in thread
From: Brian Inglis @ 2021-10-04 15:37 UTC (permalink / raw)
  To: cygwin

On 2021-10-03 13:58, Takashi Yano via Cygwin wrote:
> On Sun, 3 Oct 2021 12:25:15 -0400
> "Jason Pyeron" wrote:
>> I got the "Error: Could not fork child process: There are no
>> available terminals (-1)" error.
>> Closing N minty terminals allowed me to open exactly N more.
>> My google fu is poor, since I cannot seem to find relevant pages.
>> What is the limit?

> In current cygwin, maximum number of pty is 128.
> It is hard coded and not configurable by user.
> https://cygwin.com/git/?p=newlib-cygwin.git;a=blob;f=winsup/cygwin/tty.h#l15

Why would you want and how could you use 128 local terminal windows on 
one system, where could you put them, and be able to read them, unless 
you are building some kind of control centre, and then wouldn't GUI 
processes forked under a windows system be more useful?

There is no longer much of a limit on Cygwin 64 processes, so you could 
fork thousands of bash or any other exe processes under each terminal.

I know sysadmins who used dozens of terminal windows, but only a few 
active at a time, and they were ssh sessions to remote systems 
displaying X terminals on their desktop X server.

I've never needed more than a few terminal windows on a few systems at a 
time, but I come from the school of closing windows as soon as I don't 
need them, to reduce load, and avoid typing any command in the wrong 
window! One "Oh sh***!" is all you need ;^>

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]

[The most I've deployed was a few stations at diverse locations with 12 
windows on six screens remoting into servers running 12 front ends for a 
trading platform to reduce latency of server process transaction 
execution to low ms.]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: is there a limit on how many mintty terminals can be open at once?
  2021-10-04 15:37   ` Brian Inglis
@ 2021-10-04 19:51     ` Andrey Repin
  2021-10-04 21:55       ` Takashi Yano
  0 siblings, 1 reply; 5+ messages in thread
From: Andrey Repin @ 2021-10-04 19:51 UTC (permalink / raw)
  To: Brian Inglis, cygwin

Greetings, Brian Inglis!

> On 2021-10-03 13:58, Takashi Yano via Cygwin wrote:
>> On Sun, 3 Oct 2021 12:25:15 -0400
>> "Jason Pyeron" wrote:
>>> I got the "Error: Could not fork child process: There are no
>>> available terminals (-1)" error.
>>> Closing N minty terminals allowed me to open exactly N more.
>>> My google fu is poor, since I cannot seem to find relevant pages.
>>> What is the limit?

>> In current cygwin, maximum number of pty is 128.
>> It is hard coded and not configurable by user.
>> https://cygwin.com/git/?p=newlib-cygwin.git;a=blob;f=winsup/cygwin/tty.h#l15

> Why would you want and how could you use 128 local terminal windows on 
> one system, where could you put them, and be able to read them, unless 
> you are building some kind of control centre, and then wouldn't GUI 
> processes forked under a windows system be more useful?

Won't SSH sessions allocate pty's ?


-- 
With best regards,
Andrey Repin
Monday, October 4, 2021 22:51:31

Sorry for my terrible english...


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: is there a limit on how many mintty terminals can be open at once?
  2021-10-04 19:51     ` Andrey Repin
@ 2021-10-04 21:55       ` Takashi Yano
  0 siblings, 0 replies; 5+ messages in thread
From: Takashi Yano @ 2021-10-04 21:55 UTC (permalink / raw)
  To: cygwin

On Mon, 4 Oct 2021 22:51:55 +0300
Andrey Repin wrote:
> Greetings, Brian Inglis!
> 
> > On 2021-10-03 13:58, Takashi Yano via Cygwin wrote:
> >> On Sun, 3 Oct 2021 12:25:15 -0400
> >> "Jason Pyeron" wrote:
> >>> I got the "Error: Could not fork child process: There are no
> >>> available terminals (-1)" error.
> >>> Closing N minty terminals allowed me to open exactly N more.
> >>> My google fu is poor, since I cannot seem to find relevant pages.
> >>> What is the limit?
> 
> >> In current cygwin, maximum number of pty is 128.
> >> It is hard coded and not configurable by user.
> >> https://cygwin.com/git/?p=newlib-cygwin.git;a=blob;f=winsup/cygwin/tty.h#l15
> 
> > Why would you want and how could you use 128 local terminal windows on 
> > one system, where could you put them, and be able to read them, unless 
> > you are building some kind of control centre, and then wouldn't GUI 
> > processes forked under a windows system be more useful?
> 
> Won't SSH sessions allocate pty's ?

Incoming SSH session consumes pty. Therefore, up to 128 users (or sessions)
can login to the cygwin SSH server simultaneously. This is much less than
modern Linux (e.g. 4096 on debian).

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-10-04 21:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-03 16:25 is there a limit on how many mintty terminals can be open at once? Jason Pyeron
2021-10-03 19:58 ` Takashi Yano
2021-10-04 15:37   ` Brian Inglis
2021-10-04 19:51     ` Andrey Repin
2021-10-04 21:55       ` Takashi Yano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).