Creating pty and tty devices

Creating pty and tty devices

Post by Kevin Turnquis » Thu, 28 Jan 1999 04:00:00



    Ok, simple question (I hope):

    I need to create new pty and tty devices with different major numbers
than the defaults (I believe I need to have major 3 for tty and major 2
for tty).  As of yet, however, I haven't figured out how to do this.  I've
tried using mknod, but it always complains of either "too many" or "too
few" arguments.  Is there a nice only tutorial or HOWTO bouncing around
that explains the process?

 
 
 

Creating pty and tty devices

Post by Juergen Hein » Thu, 28 Jan 1999 04:00:00



>    Ok, simple question (I hope):

Sure ;-)

Quote:>    I need to create new pty and tty devices with different major numbers
>than the defaults (I believe I need to have major 3 for tty and major 2
>for tty).  As of yet, however, I haven't figured out how to do this.  I've
>tried using mknod, but it always complains of either "too many" or "too
>few" arguments.  Is there a nice only tutorial or HOWTO bouncing around
>that explains the process?

You either can modify the MAKEDEV script you've got ... or you will have
soon or for just the necessary ones ...
mknod -m 0644 ttyp0 c 3 0
... for instance or ...
i=0
for j in 0 1 2 3 4 5 6 7 8 9 a b c d e f
do
    mknod -m 0666 ttyp${j} c 3 ${i}
    chown  root.tty ttyp${j}
    i=$(( i + 1))
done
... not very spiffy but it does the job.

Cheers,
Juergen

--
\ Real name     : Jrgen Heinzl                 \       no flames      /

  \ Phone Private : +44 181-332 0750              \                  /

 
 
 

Creating pty and tty devices

Post by Kevin Turnquis » Fri, 29 Jan 1999 04:00:00



: >    I need to create new pty and tty devices with different major numbers
: >than the defaults (I believe I need to have major 3 for tty and major 2
: >for tty).  As of yet, however, I haven't figured out how to do this.  I've
: >tried using mknod, but it always complains of either "too many" or "too
: >few" arguments.  Is there a nice only tutorial or HOWTO bouncing around
: >that explains the process?

: You either can modify the MAKEDEV script you've got ... or you will have
: soon or for just the necessary ones ...
: mknod -m 0644 ttyp0 c 3 0
: ... for instance or ...
: i=0
: for j in 0 1 2 3 4 5 6 7 8 9 a b c d e f
: do
:     mknod -m 0666 ttyp${j} c 3 ${i}
:     chown  root.tty ttyp${j}
:     i=$(( i + 1))
: done
: ... not very spiffy but it does the job.

  Excellent.  Thanks, just what I was looking for.
: --
: \ Real name     : Jrgen Heinzl                 \       no flames      /

:   \ Phone Private : +44 181-332 0750              \                  /

 
 
 

1. SCO 5.0.5: Can't create /dev/tty, scoterm: no pty available errors.

I'm in the middle of a fresh install.
Can't quite pin down when my problem started, unfortunately.

echo "thisorthat" > /dev/tty

gives a can't create error message.
permission on /dev/tty itself is:
       crw-rw-rw-   1 bin      terminal   3,  0 Nov 27 20:04 /dev/tty

That part looks the same as on another 5.0.5 that I'm having better luck
with.

Anything on the desktop that uses scoterm also complains about no pty's.

pseudo ttys are configured to 128

shutdown hangs and I have to power off.

Any help greatly appreciated. The usual 'running out of weekend panic' of
course :-)

TIA - Heinz

2. The alternate Posix timers patch7

3. how to create new ptys and ttys?

4. OSE5.0 & Trident 9400 Video Cards

5. Q: Adding a second pseudo-tty (PTY) devices in AIX 3.2

6. Strange netstat output

7. creating tty's, mknod, stuck after boot with wrong tty - help

8. In search for documentation/help on SPARC assembler

9. free tty devices over network, network tty config

10. Getting the real tty device name (/dev/tty not good enough)

11. How to determine if tty device is a serial device

12. Q: is there any way to see what goes through a tty/pty?

13. How do I open a pty/tty pair?