Friday, January 18, 2019

Egad, printfs coming ack toio manager!


That means the console loop will want to redirect stdout to the rectangle.  Who has to handle that?  Well, io manager go stuck with compositor job. So IO manager will need a redirect fd to watch, that means it is watch four, xcb poll, mouse, keyboard, and stdio redirected. Once console lop hands off to io manager, it wants to redirect, it has no screen, it defaults to silent dispatcher.

That would be a fd with fifo in the threaded system. In the single threaded system the best solution is a standard, do not printf to stdio, fprntf to the required fd pointer (has the proper fd id). That i a change I have been working on, moving fputf via macro. thus the actual fd can be changed easily, made redirectable. In the single user case, by default, the fputs are directed to the fifo, and when i manager returns from executing a long command, it can process the results in fifo. Since it is my code, I make sure the fifo is not full and causing me to lock. The IO code itself is unchanged when moving to multi threaded situations.

No comments: