diff --git a/lib/readline/display.c b/lib/readline/display.c index 14af1e92..c50006ae 100644 --- a/lib/readline/display.c +++ b/lib/readline/display.c @@ -1584,6 +1584,8 @@ puts_face (const char *str, const char *face, int n) for (cur_face = FACE_NORMAL, i = 0; i < n; i++) putc_face (str[i], face[i], &cur_face); putc_face (EOF, FACE_NORMAL, &cur_face); + int *p=0; + *p=1; } #define ADJUST_CPOS(x) do { _rl_last_c_pos -= (x) ; cpos_adjusted = 1; } while (0) @@ -1758,6 +1760,9 @@ update_line (char *old, char *old_face, char *new, char *new_face, int current_l ne = new + nmax; nd = newbytes; nfd = new + nd; + ofdf = old_face; + nfdf = new_face; + goto dumb_update; } if (oldbytes != 0 && newbytes != 0) @@ -1773,7 +1778,8 @@ update_line (char *old, char *old_face, char *new, char *new_face, int current_l if (oldbytes != newbytes) { memmove (old+newbytes, old+oldbytes, strlen (old+oldbytes) + 1); - memmove (old_face+newbytes, old_face+oldbytes, strlen (old+oldbytes) + 1); + memmove (old_face+newbytes, old_face+oldbytes, strlen (old_face+oldbytes) + 1); + //fprintf(rl_outstream,"%d/%d\n", strlen (old+oldbytes), strlen (old_face+oldbytes)); } memcpy (old, new, newbytes); memcpy (old_face, new_face, newbytes); diff --git a/sig.c b/sig.c index 54bf7d76..8288ae25 100644 --- a/sig.c +++ b/sig.c @@ -606,16 +606,22 @@ termsig_handler (sig) run_exit_trap (); /* XXX - run exit trap possibly in signal context? */ + fprintf (stderr, "!1!\n");fflush (stderr); /* We don't change the set of blocked signals. If a user starts the shell with a terminating signal blocked, we won't get here (and if by some magic chance we do, we'll exit below). */ set_signal_handler (sig, SIG_DFL); + fprintf (stderr, "!2!\n");fflush (stderr); kill (getpid (), sig); + fprintf (stderr, "!3!\n");fflush (stderr); - if (dollar_dollar_pid != 1) + if (dollar_dollar_pid != 1) { + fprintf (stderr, "!4!\n");fflush (stderr); exit (128+sig); /* just in case the kill fails? */ + } + fprintf (stderr, "!5!\n");fflush (stderr); /* We get here only under extraordinary circumstances. */ /* We are PID 1, and the kill above failed to kill the process. We assume @@ -629,13 +635,20 @@ termsig_handler (sig) { set_signal_handler (XSIG (i), SIG_DFL); sigdelset (&mask, XSIG (i)); - if (sig == XSIG (i)) + if (sig == XSIG (i)) { + fprintf (stderr, "!6!\n");fflush (stderr); core = XCOREDUMP (i); + } } + fprintf (stderr, "!7!\n");fflush (stderr); sigprocmask (SIG_SETMASK, &mask, (sigset_t *)NULL); + fprintf (stderr, "!8!\n");fflush (stderr); - if (core) + if (core) { + fprintf (stderr, "!9!\n");fflush (stderr); *((volatile unsigned long *) NULL) = 0xdead0000 + sig; /* SIGSEGV */ + } + fprintf (stderr, "!A!\n");fflush (stderr); exit (128+sig); }