DragonFly bugs List (threaded) for 2012-02
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
[DragonFlyBSD - Bug #2274] (Rejected) C12 problem on leaf.dragonflybsd.org
Issue #2274 has been updated by Alex Hornung.
Status changed from New to Rejected
It's quite surprising that it works anywhere, I think. You are enabling local echo while the character is buffered (i.e. select has returned what you wanted), then disabling it again before it's read. It doesn't strike me as a good idea that should work anywhere.
Changing your GetNextInputChar as follows (note that #if 0), makes it work just fine and is in line with good UNIX programming:
int GetNextInputChar (void) const {
int retVal;
#if 1
RawInput();
do {
fd_set readfs;
FD_ZERO(&readfs);
FD_SET (fileno(stdin), &readfs);
struct timeval timeout = { 2, 0 };
#if 0
RawInput (); // A ^Z can reset the terminal/termios(4)
// setting, so we set it to the desired
// configuration just before any I/O
// operating (including select(2)).
//
#endif
retVal = select ((fileno(stdin) + 1), &readfs, NULL, NULL, &timeout);
#if 0
Restore (); // Restore termios(4) ASAP after RawInput().
#endif
ASSERT (retVal != -1);
} while (retVal <= 0);
#endif
#if 0
RawInput (); // A ^Z can reset the terminal/termios(4)
// setting, so we set it to the desired
// configuration just before any I/O
// operating (including select(2)).
//
#endif
const int key = fgetc (stdin);
Restore (); // Restore termios(4) ASAP after RawInput().
ASSERT (!ferror (stdin));
ASSERT (!feof (stdin));
return key;
}
----------------------------------------
Bug #2274: C12 problem on leaf.dragonflybsd.org
http://bugs.dragonflybsd.org/issues/2274
Author: Robin Carey
Status: Rejected
Priority: Low
Assignee:
Category:
Target version:
Dear DragonFlyBSD bugs,
I reported this problem just recently, and then mistakenly believed an O/S
upgrade on
leaf.dragonflybsd.org had solved the problem. Unfortunately, that was not
the case (I
had changed the code during testing/debugging and had forgot that I had
changed
the code, which led to me believing the problem had been solved).
The problem is with C12 (C12G22r2) operation on leaf.dragonflybsd.org; the
source
code can be downloaded from:
http://www.leopard.uk.com/C12
The problem manifests as a termios(4)/Terminal problem, e.g.
Local echo is not switched off (there are probably other problems
aswell).
Since C12G22r2 works fine on OpenBSD-4.7/i386 and
FreeBSD-9.0/i386, I conclude the problem is with
DragonFlyBSD.
--
Sincerely,
Robin Carey BSc
--
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]