[ale] UNIX98 PTYs

Christopher Fowler cfowler at outpostsentinel.com
Fri Mar 24 14:53:40 EST 2006


I'm running some software that uses PTYs and I'm trying to get it to use
600 of them.  I'm running in this problem of it running out of ttys.  It
seems that when the application requests a new tty it is given one after
the last one open.  In other words if /dev/pts/1 is closed and does not
exist and /dev/pts/2000 does the app gets 2001 not 2000.  It appeared
that because of the 4096 limit the kernel refused to give one numbered
4097.

[tomcat at sam2u char]$ ls /dev/pts/
1405  1437  1443  1449  1455  1461  1467  1473  1480  1486  1492  1498
1504  1511  1517  1524  1531  1538  1545  228
1431  1438  1444  1450  1456  1462  1468  1474  1481  1487  1493  1499
1505  1512  1518  1525  1532  1539  220   229
1432  1439  1445  1451  1457  1463  1469  1475  1482  1488  1494  1500
1506  1513  1519  1526  1534  1540  222   231
1433  1440  1446  1452  1458  1464  1470  1476  1483  1489  1495  1501
1507  1514  1520  1527  1535  1542  223   232
1434  1441  1447  1453  1459  1465  1471  1477  1484  1490  1496  1502
1508  1515  1521  1528  1536  1543  225   294
1435  1442  1448  1454  1460  1466  1472  1479  1485  1491  1497  1503
1510  1516  1523  1529  1537  1544  227


So my app is getting assigned pseudos in the high numbers but why can't
it get /dev/pts/1 which is not being used.
[tomcat at sam2u char]$ uname -a
Linux sam2u.opsup.com 2.6.6-1.435.2.3-SAM #2 Sun Jul 11 15:16:13 EDT
2004 i686 i686 i386 GNU/Linux
[tomcat at sam2u char]$ 





More information about the Ale mailing list