LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Where is /dev/ttyp* and /dev/pty* on RH 4.0 ? (http://www.linuxquestions.org/questions/linux-software-2/where-is-dev-ttyp%2A-and-dev-pty%2A-on-rh-4-0-a-478003/)

ThomasRonshof 08-28-2006 04:53 AM

Where is /dev/ttyp* and /dev/pty* on RH 4.0 ?
 
I use them in my software and have realised they are non existing in CentOS 4.3 and Redhat 4.0. Is there a script to make them ?

They existed i earlier releases of both CentOS and RH ! eg. RH 3.0!

MensaWater 08-29-2006 02:08 PM

These are pseudo ttys.

I'm used to seeing pseudo ttys as /dev/pts#. For the heck of it I did man pts and it has the following note at the bottom:

FILES
/dev/ptmx, /dev/pts/*

NOTES
The Linux support for the above (known as Unix98 pty naming) is done
using the devpts filesystem, that should be mounted on /dev/pts.

Before this Unix98 scheme, master ptys were called /dev/ptyp0, ... and
slave ptys /dev/ttyp0, ... and one needed lots of preallocated device
nodes.

Same note in both the release 3 and 4 man pages but oddly enough I do see /dev/ttyp* entries on 3 but not on 4. However the connections all seem to use /dev/pts/* as I'm used to.

ThomasRonshof 08-30-2006 12:59 AM

yes, but our software expects and uses theese devices. expect they exist in /dev.

Isn't there a workaround in creating the devices ?

Alternatively the software have to bee rewritten, just because a new release of Redhat...

MensaWater 08-30-2006 01:56 PM

You could just make symbolic links to the devices you're really using. Or you could use "mknod" to make the devices you want but you'd have to know the major/minor number for each.

The deal is since this was in the RH man page for 3 but the devices were still there it means it had likely been deprecated but still left there for 3 then completely removed for 4. You'd be much better off doing a rewrite to deal with the way it is supposed to be than to trick it into looking the way you originally wrote it. Its also possible whatever utility you're used to expects ioctl or something else to change ownership/permissions which it would still do for the /dev/pts/* stuff but probably wouldn't for what you do your mknod for. The symlinks would have the permission of the /dev/pts/* it pointed to so might be the way to go.

To create a symbolic link named /dev/ttyp1 that points to /dev/pts/1 just type:

ln -s /dev/pts/1 /dev/ttyp1

By the way. The /dev/pts/* entries seem to be created on use rather than staying there. The links can be created even if the /dev/pts/* you link to isn't there yet.


All times are GMT -5. The time now is 07:40 PM.