On Wed, Mar 22, 2006 at 02:44:49AM +0100, Uwe Stuehler wrote:
> Something is wrong with the way aterm uses the termios interface,
> at least on OpenBSD.
> 
> Start aterm and watch the output of "stty -a".
> 
> The "status" special character is set randomly, more often it is not
> even a control character, making it impossible to use certain letters
> as program input.
> 
> The diff below applies to ${PORTSDIR}/x11/aterm.
> Please test and comment, or try to come up with a better fix. :-)
> 
> At a glance, get_ttymode() could be returning a termios structure
> where the c_cc array is only partially initialized.  I'm tempted to
> blame it on the macro definitions in rxvt.h, but I don't have the
> time to take a closer look now.

Is this why once in a while I get:

        load: 0.46  cmd: ssh 15225 [select] 0.13u 0.04s 0% 620k

on my screen whenever a press a certain character?

> (By the way: aterm 1.0.0 would likely have the same problem.)
> 
> Index: patches/patch-src_command_c
> ===================================================================
> RCS file: /cvs/ports/x11/aterm/patches/patch-src_command_c,v
> retrieving revision 1.2
> diff -u -p -r1.2 patch-src_command_c
> --- patches/patch-src_command_c       16 Sep 2004 17:07:11 -0000      1.2
> +++ patches/patch-src_command_c       22 Mar 2006 00:49:48 -0000
> @@ -1,5 +1,5 @@
> ---- src/command.c.orig       Thu Sep  6 10:38:07 2001
> -+++ src/command.c    Wed Sep 15 20:38:55 2004
> +--- src/command.c.orig       Thu Sep  6 18:38:07 2001
> ++++ src/command.c    Wed Mar 22 01:50:30 2006
>  @@ -477,6 +477,16 @@ get_pty(void)
>       ptydev = ttydev = _getpty(&fd, O_RDWR | O_NDELAY, 0622, 0);
>       if (ptydev == NULL)
> @@ -17,7 +17,27 @@
>   #elif defined (__svr4__) || defined(__CYGWIN32__) || defined(__lnx21__)
>       {
>       extern char    *ptsname();
> -@@ -2148,11 +2158,23 @@ process_x_event(XEvent * ev)
> +@@ -759,6 +769,9 @@ debug_ttymode(ttymode_t * ttymode)
> + #  ifdef VLNEXT
> +     FOO(VLNEXT, "VLNEXT");
> + #  endif
> ++#  ifdef VSTATUS
> ++    FOO(VSTATUS, "VSTATUS");
> ++#  endif
> +     fprintf(stderr, "\n\n");
> + #  undef FOO
> + # endif                             /* HAVE_TERMIOS_H */
> +@@ -817,6 +830,9 @@ get_ttymode(ttymode_t * tio)
> + # if VTIME != VEOL
> +     tio->c_cc[VTIME] = 0;
> + # endif
> ++# ifdef VSTATUS
> ++    tio->c_cc[VSTATUS] = CSTATUS;
> ++# endif
> + 
> + /* input modes */
> +     tio->c_iflag = (BRKINT | IGNPAR | ICRNL | IXON
> +@@ -2148,11 +2164,23 @@ process_x_event(XEvent * ev)
>       static int      bypass_keystate = 0;
>       int             reportmode;
>       static int      csrO = 0;       /* Hops - csr offset in thumb/slider    
>   */
> @@ -42,7 +62,7 @@
>       break;
>   
>       case ClientMessage:
> -@@ -2217,6 +2239,9 @@ process_x_event(XEvent * ev)
> +@@ -2217,6 +2245,9 @@ process_x_event(XEvent * ev)
>   
>       case FocusIn:
>       if (!TermWin.focus) {
> 

Reply via email to