9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Yaroslav <yarikos@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] RFS alternatives (Was: Living with Plan 9)
Date: Thu, 30 Jun 2011 18:31:19 +0300	[thread overview]
Message-ID: <BANLkTim2P9UhDab7n8s4c0TBn2mL4sOF4w@mail.gmail.com> (raw)
In-Reply-To: <201106272323.31408.dexen.devries@gmail.com>

> 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
...



  reply	other threads:[~2011-06-30 15:31 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-27 17:07 rbnsw-plan9
2011-06-27 17:20 ` ron minnich
2011-06-27 17:45   ` Jeff Sickel
2011-06-27 18:18     ` Skip Tavakkolian
2011-06-27 19:13       ` dexen deVries
2011-06-27 20:17         ` erik quanstrom
2011-06-27 21:23           ` dexen deVries
2011-06-30 15:31             ` Yaroslav [this message]
2011-06-27 18:26   ` Richard Miller
2011-06-27 20:50   ` [9fans] Four chances (was RFS alternatives (Was: Living with Plan 9)) Aharon Robbins
2011-06-27 17:24 ` [9fans] RFS alternatives (Was: Living with Plan 9) erik quanstrom
2011-06-30 17:11   ` rbnsw-plan9
2011-06-30 20:07     ` erik quanstrom
  -- strict thread matches above, loose matches on Subject: below --
2011-06-21 17:35 rbnsw-plan9
2011-06-21 22:42 ` dave.l
2011-06-22 15:16   ` Charles Forsyth
2011-06-11 19:26 rbnsw-plan9
2011-06-21 12:51 ` Eric Van Hensbergen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTim2P9UhDab7n8s4c0TBn2mL4sOF4w@mail.gmail.com \
    --to=yarikos@gmail.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).