* [9fans] segattach plan9port
@ 2007-10-12 2:54 fernanbolando
2007-10-12 4:09 ` erik quanstrom
2007-11-27 16:03 ` Russ Cox
0 siblings, 2 replies; 5+ messages in thread
From: fernanbolando @ 2007-10-12 2:54 UTC (permalink / raw)
To: 9fans
last night I was looking into vt source. I tried to compile under
p9p and in consctl.c it was calling the p9 system call segattach.
I was wondering if somebody can point me in a p9p port that shows
a very simple and straight forward example of the conversion of the p9
to p9p segattach.
I did a quick google and I am currently browsing the source differences
between p9 and p9p, but so far no luck yet.
just a note
Page in the browse source section of p9p site still points to the psv
script, instead of the p9 port of Page.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [9fans] segattach plan9port
2007-10-12 2:54 [9fans] segattach plan9port fernanbolando
@ 2007-10-12 4:09 ` erik quanstrom
2007-11-27 16:03 ` Russ Cox
1 sibling, 0 replies; 5+ messages in thread
From: erik quanstrom @ 2007-10-12 4:09 UTC (permalink / raw)
To: 9fans
shmemget(2) would be a more-or-less direct replacement.
really converting it would require using the thread library and send and recv
or another mechanism. using a shared memory segment for the console state
doesn't feel right to me.
- erik
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [9fans] segattach plan9port
2007-10-12 2:54 [9fans] segattach plan9port fernanbolando
2007-10-12 4:09 ` erik quanstrom
@ 2007-11-27 16:03 ` Russ Cox
2007-11-27 20:02 ` Derek Fawcus
2007-11-28 12:18 ` Fernan Bolando
1 sibling, 2 replies; 5+ messages in thread
From: Russ Cox @ 2007-11-27 16:03 UTC (permalink / raw)
To: 9fans
> last night I was looking into vt source. I tried to compile under
> p9p and in consctl.c it was calling the p9 system call segattach.
>
> I was wondering if somebody can point me in a p9p port that shows
> a very simple and straight forward example of the conversion of the p9
> to p9p segattach.
As others noted, you don't really want segattach.
That code could be rewritten to make consctl a
separate shared-memory thread instead of allocating
this one-time shared data structure.
But even if you do that, consctl depends on getting
terminal change (rawon, rawoff) events on /dev/consctl,
which doesn't exist on Unix. To really port vt you'd have
to add all sorts of pty-handling code like in 9term.
If you need a cursor-addressed terminal window,
you're better off just using xterm. The cursor-addressed
programs you are trying to run will probably work
better anyway.
Russ
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [9fans] segattach plan9port
2007-11-27 16:03 ` Russ Cox
@ 2007-11-27 20:02 ` Derek Fawcus
2007-11-28 12:18 ` Fernan Bolando
1 sibling, 0 replies; 5+ messages in thread
From: Derek Fawcus @ 2007-11-27 20:02 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
On Tue, Nov 27, 2007 at 11:03:02AM -0500, Russ Cox wrote:
>
> But even if you do that, consctl depends on getting
> terminal change (rawon, rawoff) events on /dev/consctl,
> which doesn't exist on Unix.
I've been working on and off on a 'pty slave' which sort
of does that giving cooked/raw/cbreak messages based on
pty changes. The idea being to convert the pty handling
crud to a message protocol.
The code is ugly, being a wip which has grown as I
experimented, but does seem to work on Solaris/Linux/OSX.
The major missing bit is support for completion, and then
the proper driver program. One thought was to drive it
from a suitable hacked p9p 9term.
DF
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [9fans] segattach plan9port
2007-11-27 16:03 ` Russ Cox
2007-11-27 20:02 ` Derek Fawcus
@ 2007-11-28 12:18 ` Fernan Bolando
1 sibling, 0 replies; 5+ messages in thread
From: Fernan Bolando @ 2007-11-28 12:18 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
On 11/28/07, Russ Cox <rsc@swtch.com> wrote:
> > last night I was looking into vt source. I tried to compile under
> > p9p and in consctl.c it was calling the p9 system call segattach.
> >
> > I was wondering if somebody can point me in a p9p port that shows
> > a very simple and straight forward example of the conversion of the p9
> > to p9p segattach.
>
> If you need a cursor-addressed terminal window,
> you're better off just using xterm. The cursor-addressed
> programs you are trying to run will probably work
> better anyway.
Actually the reason I was looking into the vt source was I needed a
terminal only
access to the 9grid. After a bit of patience you guys came up with
comterm, which is what I wanted.
Right now that I am still using 9pclient and
drawterm to to do some file transfer stuff, But later I will try to compile
comterm and switch to it.
--
http://www.fernski.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-11-28 12:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-12 2:54 [9fans] segattach plan9port fernanbolando
2007-10-12 4:09 ` erik quanstrom
2007-11-27 16:03 ` Russ Cox
2007-11-27 20:02 ` Derek Fawcus
2007-11-28 12:18 ` Fernan Bolando
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).