This forum has been archived. All content is frozen. Please use KDE Discuss instead.

A new C# Terminal/Shell for Windows

Tags: None
(comma "," separated)
cedricpoottaren
Registered Member
Posts
1
Karma
0

A new C# Terminal/Shell for Windows

Sun Feb 19, 2017 5:08 pm
Hello Guys,

I am writing a new C# Shell for windows and I know that this is not the best place for this but I found no help on other communities so I said I will try out a linux commune.

Ok so, my shell is OS and can be found here: https://github.com/jcplaboratory/rashell

Im having trouble with StreamWriting to running applications. e.g: say I am running 'sudo apt-get upgrade' on Linux through Konsole. Apt will ask me for a confirmation before it begins to download and install which means I am interacting with the process.

I need to be able to do the exact thing with my shell. Interact with a running app when it requests for inputs.

Does somebody happen to know how to do that?


Thanks folks.
airdrik
Registered Member
Posts
1854
Karma
5
OS
There are two different components involved and it isn't entirely clear to me which you are trying to implement. It seems most likely to me that your command processor is trying to do what Bash and other command shells do: launch processes, which includes setting up the STDIN, STDOUT and STDERR file handles for the launched processes and tracking their execution. You should do some research on command shells to learn how they handle that.

It sounds like you may also be interested in how Konsole and other terminal emulators work. As I understand it, Terminal emulators provide essentially a view of the output of a currently-running process and pass input from the user to that process. They will set up the initial STDIN, STDOUT and STDERR file handles of the initial command (usually bash or whatever the user has selected as their preferred shell). Then they will listen for keyboard input which is written to STDIN and listen to writes to STDOUT and STDERR which they display on the output window.


airdrik, proud to be a member of KDE forums since 2008-Dec.


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], Sogou [Bot]