[Freemint-list] Handling of PRGs/APPs which console output
Miro Kropáček
miro.kropacek at gmail.com
Thu Jan 5 18:13:43 MSK 2017
(sorry for the longer introduction...)
>From time to time I visit the infamously private ;) FireBee forum and I've
got engaged in quite interesting question/problem.
You certainly know the main difference between PRG/APP and TOS/TTP, esp. in
multitasking environments. The latter opens a console window and output all
the text there. PRG/APP on the other hand aren't supposed to have any
output.
Or are they? PRGs/APPs are apps like any other with some warnings, errors
or even debug messages. Sure, an experienced user can run it from a shell,
redirect stdout/stderr to a file, no problem. But what about the other
users? Who have no clue?
So the typical problem (also applies for TOS) is that if such PRG/APP
starts spitting some console output, it goes directly to the screen, i.e.
making the screen completely messed up, esp. in XaAES and friends. This had
been recognised as an issue by MultiTOS/MiNT developers and they'd come up
with /dev/xconout2 which eats all console output *if it's opened.* If it's
not, everything is as before.
Current solution therefore is that you start TosWin2, ignore all its bugs,
open the console window and voila, this in turn opens /dev/xconout2 and
your screen is not smashed anymore. Until you close the window.
Now, finally the problem: this seems to be not very well received by users,
i.e. they are freaking out if they see either a) messed up screen (no
wonder here...) and/or b) an opened console window with lotsa scary debug
messages. Simply put -- they wish to make it disappear.
There are two ways how to do this -- either globally redirect CON: to
/dev/null (or a valid file) or do the same in TosWin2. What kind of sucks
because what if you suddenly want to see output of one particular app (for
instance yours? ;-)).
After a lot of ideas, workarounds, fix proposals to TosWin2 I've come up
with this: make it similar to Linux DEs, i.e. offer something as a launcher
with a property "open in a new console window".
First I thought Teradesk/Thing should provide such functionality but then I
realised we actually already have such launcher: XAAES' app options.
So my proposal / question is: what do you think of this setup:
- during the boot, console is normally printed
- as soon as XaAES is started, console output is redirected to /dev/null
- so every PRG/APP wouldn't print one single letter anywhere
- if you have an app for which you do want to see some output, enable in
XAAES.CNF a flag called "open_console" (or something similar) which would
lead to running the PRG/APP using $TOSRUN (usually TosWin2), with its own
console window and output printed there (optionally redirected to a file,
using TosWin2's logging option)
- as soon as the app in question terminates, its console window is closed
--
MiKRO / Mystic Bytes
http://mikro.atari.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.atariforge.org/pipermail/freemint-list/attachments/20170106/8bd13818/attachment-0001.html
More information about the Freemint-list
mailing list