lkml.org 
[lkml]   [1998]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectpty pairs in POSIX with devpts
Can someone explain the POSIX-ly correct way to open pseudo-tty pairs?

There's the good old BSD method which involves searching through all
/dev/pty[p-za-e][0-9a-f], and assuming the slave side is named "ttyXX".
Hopefully that's not it.

Then there's the SVR4 way, which uses "/dev/ptmx", grantpt(), unlockpt(),
and ptsname(), which don't appear in glibc-2.0.6.

I've tried using the devpts filesystem and "/dev/pts/<minor>" for opening
the slave, which seems to work fine, but wonder if I should trust that
it'll be common for users to have /dev/pts mounted, with the correct
permissions. (It's still experimental in late 2.1 kernels.)

Suggestions?
-- Pete
-----------------------------------------------------
Pete Wyckoff | wyckoff@ca.sandia.gov
Sandia National Laboratories | 510 294 3503 (voice)
MS 9011, P.O. Box 969 | 510 294 1225 (fax)
Livermore, CA 94551 |

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:42    [W:0.050 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site