Terminal Emulation?

Robin Lee Powell rlpowell at digitalkingdom.org
Thu Jan 16 07:13:03 CET 2003


I have tried to right very, very simple Mozart code to basically act as
a telnet server.  The code is attached.

It very much doesn't work.  In particular, anything that uses any
terminal features at all fails, presumably because bash thinks that it
is talking to STDIN and STDOUT and can't see a terminal.

Is there any simple way around this?

Thanks.

-Robin, who knows almost nothing about terminals at all.

-- 
http://www.digitalkingdom.org/~rlpowell/    ***    I'm a *male* Robin.
.i le pamoi velru'e zo'u crepu le plibu taxfu
.i le remoi velru'e zo'u mo .i le cimoi velru'e zo'u ba'e prali .uisai
http://www.lojban.org/   ***   to sa'a cu'u lei pibyta'u cridrnoma toi
-------------- next part --------------
functor
import
Application
Open
System

define

S

class Shell from Open.pipe end

class MyPort from Open.socket end

Port

in
    S={New Shell init(cmd:"/bin/sh" args: ["-li"] )}


    Port={New MyPort init( )}
    {Port bind( takePort: 7123)}
    {Port listen( )}
    {Port accept( )}

    thread
	local
	    proc {More}
		{Port write( vs: {S read( list: $ )} )}
		{More}
	    end
	in
	    {Port write( vs: {S read( list: $ )} )}
	    {More}
	end
    end

    local
	proc {More}
	    {S write( vs: {Port read( list: $ )} )}
	    {More}
	end
    in
	{S write( vs: {Port read( list: $ )} )}
	{More}
    end

    {Application.exit 0}
end


More information about the mozart-users mailing list