Terminal emulator from scratch.


 
Thread Tools Search this Thread
Top Forums Programming Terminal emulator from scratch.
# 22  
Old 03-14-2011
Quote:
Originally Posted by howdini
The only time I received an isatty related error was with a few interactive types of programs like top. It said that the tty check failed, just as you said some of them would. passwd on the other hand launches well and requests for some input.
If stdin isn't a terminal, it will open /dev/tty directly and talk to the terminal through that. This bypasses your pipes completely.
Quote:
getting it this input and retrieving the next output is proving to be the challenge. I hope you are not saying that this method completely cannot work with interactive programs.
I am; I tried to warn you about this from the beginning.

Not that this has been a waste of your time. There is a way to do this, closely related to what you've been doing -- instead of creating and duplicating pipes over things, create and duplicate a virtual terminal. It acts sort of like a pipe, with some important differences -- it's bidirectional, for one thing. And ctrl-c characters will cause the kernel to send SIGINT, etc, like you'd expect to happen in a terminal. here's an example I wrote back when I was playing with vterms and linked early in this thread. It'll be trickier than using pipes but related so it's a good thing to have gotten pipes working first.
# 23  
Old 03-14-2011
Ok, thanks. It definitely looks like a build up of what I have been learning to do. It will take me some time to learn whats going on in that code but it looks really good.
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Terminal Emulator

Hi, I was just wondering how to distinguish between the two terms: 1. Terminal emulator (vt100, vt220 and so on) 2. shell command line Then i decided to conclude myself that these 2 are very equivalent. am I right? this actually came to my mind when I was using my HP-UX terminal. I am... (1 Reply)
Discussion started by: messi777
1 Replies

2. Solaris

Tera Terminal Emulator

Hello Expert! :b: Question for you guys, Can anyone tell me how to use terminal emulator on Windows XP to view Solaris config? I have no idea on Solaris and the only thing I could do is to boot it up. Honestly, I have given a tasked to delete all the files and some necessary memory information... (2 Replies)
Discussion started by: katsloko
2 Replies

3. UNIX for Advanced & Expert Users

Filesystem from scratch

Hey, Had anyone tried with writing a new FS - file system ( whether its useful or not, that doesn't matter ) ? I tried one couple of years ago, but that was a fatal failure :( and can't continue working on it since then. :( Anybody got some experience with writing file system from the... (4 Replies)
Discussion started by: matrixmadhan
4 Replies

4. UNIX for Advanced & Expert Users

unix from scratch

hi all, i'm trying to write a unix system from scratch (not re-writing the kernel) does anyone have information about that? tips and stuff...?i would appreciate every help, thnks :) (9 Replies)
Discussion started by: elzalem
9 Replies

5. Linux

how to use terminal emulator???

hello, can any body tell how to use terminal emulator.... i want to check he serial port communication with the help of that terminal emmulator.... also tell me how to open terminal emmulator.....and how to configure it........and how to use it... I am using fedora core 6..... (1 Reply)
Discussion started by: arunchaudhary19
1 Replies
Login or Register to Ask a Question