Hello!
First, I will present a small description of the console window in the Cyjon system.
1. The user starts the process named "
console", this process creates a window of a defined size in pixels and becomes its owner, the process has its own IO data stream.
2. "
console" starts the next process called "
shell" and becomes its parent, the output of the "
shell" process is connected to the "
console" input stream, so everything that is sent to the output - "
console" automatically receives and displays in his own window
3.all programs started through "
shell" inherit the output stream from "
shell", so I know that everything will go to the input stream of "
console"
"
shell" can ask the parent for the width and height of the window in
characters ... and everything is fine
I have a problem when the "
shell" starts its own process, e.g. the "
hello" program,
I don't know how "
hello" is supposed to get information about the window size, if its parent is "
shell" and it doesn't know which process owns the window
Should the "
shell" process forward queries about the window properties to its parent? and then send them back to the
descendants?
Or maybe every child process of the "
console" program should receive information about what window it is running in? or who owns it ...