From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <201106272323.31408.dexen.devries@gmail.com> References: <1309194435.17968.YahooMailClassic@web30908.mail.mud.yahoo.com> <201106272113.17259.dexen.devries@gmail.com> <201106272323.31408.dexen.devries@gmail.com> Date: Thu, 30 Jun 2011 18:31:19 +0300 Message-ID: From: Yaroslav To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Subject: Re: [9fans] RFS alternatives (Was: Living with Plan 9) Topicbox-Message-UUID: f89095c0-ead6-11e9-9d60-3106f5b1d025 > also, the `protocol' of creating new /dev/pts/* is somewhat sensible, too. no > ioctl(), just open /dev/pmtx, read a textual representation of an integer N > and open /dev/pts/N. nah, slave name is obtained with ptsname(master) which does ioctl(TIOCGPTN) on Linux. ... open("/dev/ptmx", O_RDWR|O_NOCTTY) = 3 statfs("/dev/pts", {f_type="DEVPTS_SUPER_MAGIC", f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0 ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 ioctl(3, TIOCGPTN, [8]) = 0 stat64("/dev/pts/8", {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 8), ...}) = 0 ... AIX does too: ... kopen("/dev/ptc", O_RDWR|O_NOCTTY) = 3 __loadx(0x01480180, 0x2FF21B50, 0x00000A50, 0xF06AFBB4, 0x00000000) = 0xF0FE4A28 _kgrantpt(0x00000003, 0x00000001, 0xF065F3F8, 0x0000D032, 0x00000003, 0x00000350, 0x00000000, 0x00000000) = 0x00000000 kioctl(3, 536900678, 0x2FF22670, 0x00000000) = 0 kioctl(3, 536900679, 0x2FF225F0, 0x00000000) = 0 kioctl(3, 22529, 0x2FF221B4, 0x00000000) = 0 statx("/dev/pts/27", 0x2FF221D8, 76, 0) = 0 ...