[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: the big term patch
From: |
Marcus Brinkmann |
Subject: |
Re: the big term patch |
Date: |
Sun, 10 Feb 2002 19:32:49 +0100 |
User-agent: |
Mutt/1.3.27i |
On Fri, Feb 08, 2002 at 09:39:59PM -0500, Roland McGrath wrote:
> It would be ideal to separate the commits into: bottomhalf interface
> changes, using argp, and adding the hurdio bottomhalf.
Did that. I found one critical bug, too, which might explain some of the
weirdness I saw when testing (io_write didn't call start_output at
successful write, the if condition was inverted).
> In general, we should check for anything like this in the code. For
> anything that can have an error, the global state should not be tweaked
> before the bottomhalf call is attempted, and the bottomhalf call should
> have an argument for the new state being put in. Only in the call succeeds
> should term's state variables be updated. Maybe you have covered this
> already.
Mostly, although there are some thigns that should be cleaned up in the
ptyio bottom handler, and some read only accesses to termflags/termstate
throughout which we might to clean up. And the hurdio bottom handler
diddles the termstate at open time (but I am not sure it is necessary to do
that, it might be sufficient to just call set_bits with a copy of termstate
and not update termstate itself, see wait_for_dtr).
> It might be good to have a stub bottomhalf (similar to the "unknown" store
> type I added), where every hook is just a no-op or returns EIO.
I left this out for now, but it is surely easy enough to add that whenever
we feel like it.
> it made me think that it would be most useful to write a
> simple translator to be your own test harness.
That is surely a good idea, and I had the idea to write a terminal emulator,
when I realised that term itself is such an emulator. So I tried the
stacked term approach, for example with a term hurdio on /dev/com0, and
could check that for example changing the speed on either node does the
right thing. A complete test harness is surely better, but I will be able
to do some more tests with the console server (aka colortext), which is more
useful to us now.
> If you are on random feature patrol, seems like we might as well give term
> the --readonly/--writeonly options (and --writable and all aliases)
> streamio has.
I left this out, too, because I am not sure what should happen on those
ioctls and control characters (things like echoing) in each individual case.
> I guess we might as well have --rdev too.
Ok, I put this in.
Thanks,
Marcus
--
`Rhubarb is no Egyptian god.' Debian http://www.debian.org brinkmd@debian.org
Marcus Brinkmann GNU http://www.gnu.org marcus@gnu.org
Marcus.Brinkmann@ruhr-uni-bochum.de
http://www.marcus-brinkmann.de