From: rick@ee.uwm.edu (Rick Miller, Linux Device Registrar) Subject: Re: More than 16 ptys ? Date: 29 Mar 1993 10:09:16 GMT
Jyri_L._Palm@p100.f2003.n241.z2.fidonet.org (Jyri L. Palm) writes:
[...]
>Anyway, I'm wondering how to increase the number of ttys on the
>system. I often get the message "fork:Try again" after I open up
>about 8 unix windows ... why is this ? would increasing the number of
>available ptys help ?
It very well may. You can (currently) have a max. of 64 pty-tty pairs.
Their major numbers are all "4" with minor numbers like so:
128-191: /dev/pty[p-s][0-f]
192-255: /dev/pty[p-s][0-f]
The following shell-script (for /bin/bash) would re-create all your new
pty's for you:
==========<cut here>=============
#!/bin/bash
#
# This script re-creates pty-tty pairs for your Linux. You must be
# "root" to successfully run this script.
#
# C A U T I O N !
# Don't run this script while in X Windows, since it wipes out your
# old pty-tty pairs before creating new ones.
if [ $LOGNAME != root ]; then
echo 'You must be the super-user to successfully run this script.'>&2
exit 1
fi
pushd /dev
N=128
for X in p q r s ; do
for Y in 0 1 2 3 4 5 6 7 8 9 a b c d e f ; do
mknod pty${X}${Y} c 4 $N
mknod tty${X}${Y} c 4 $[$N + 64]
N=$[$N + 1]
done
done
popd
exit 0
Rick Miller <rick@ee.uwm.edu> | <ricxjo@discus.mil.wi.us> Ricxjo Muelisto
Send a postcard, get one back! | Enposxtigu bildkarton kaj vi ricevos alion!
RICK MILLER // 16203 WOODS // MUSKEGO, WIS. 53150 // USA