persistent ptys
Hi,
It seems BSD style ptys are on the way out, and most systems will soon have just Unix98 style ptys. This makes me want to move something to Unix98 ptys, but I'm not sure of the appropriate way. The issue is that things like HylaFAX expect to work with well known, persistent, names for modem ports. A 100% soft modem in user space can easily provide that with BSD ptys. With Unix98 ptys it is not so obvious what to do. Most commercial soft modems don't have this issue, as they are part kernel space/part user space designs. Obviously creating a link to a dynamically generated pty with a well known name, and various other things could be done. However, I assume other people have had to do similar persistent pty things, and there is a well defined common practice for it. Can anyone tell me what it is? :-\
Regards,
Steve
Hi!
Quoted 7 lines
It seems BSD style ptys are on the way out, and most systems will soon have just Unix98 style ptys. This makes me want to move something to Unix98 ptys, but I'm not sure of the appropriate way. The issue is that things like HylaFAX expect to work with well known, persistent, names for modem ports. A 100% soft modem in user space can easily provide that with BSD ptys. With Unix98 ptys it is not so obvious what to do. Most
Do you actually have user-space softmodem implementation? Is it open-source? I guess it would be very interesting for remaining modem users :-).
Pavel
Signature · 1 line
When do you have heart between your knees?
Followup to: <[email protected]>
By author: Steve Underwood <[email protected]>
In newsgroup: linux.dev.kernel
Quoted 16 lines
Hi,
It seems BSD style ptys are on the way out, and most systems will soon have just Unix98 style ptys. This makes me want to move something to Unix98 ptys, but I'm not sure of the appropriate way. The issue is that things like HylaFAX expect to work with well known, persistent, names for modem ports. A 100% soft modem in user space can easily provide that with BSD ptys. With Unix98 ptys it is not so obvious what to do. Most commercial soft modems don't have this issue, as they are part kernel space/part user space designs. Obviously creating a link to a dynamically generated pty with a well known name, and various other things could be done. However, I assume other people have had to do similar persistent pty things, and there is a well defined common practice for it. Can anyone tell me what it is? :-\
Two options: either continue to use BSD ptys (the kinds of stuff you describe above is actually the one case where BSD ptys is a better choice than Unix98 ptys) *or* create symlinks -- or if that doesn't work for you, device nodes -- dynamically.
I.e. have a program which opens /dev/ptmx, gets a slave pty with a specific ptsname(), then does a symlink() into a suitable directory. The symlink is your persistent name.
-hpa