Loading ...
Sorry, an error occurred while loading the content.

Re: runaway vim processes

Expand Messages
  • Daniel Elstner
    ... Yes, that sounds good to me. ... Yep. But I d change the wording of the comment to: /* On Linux, glibc compiled for minimum kernel 2.2 has a bug in *
    Message 1 of 14 , Mar 4, 2003
    View Source
    • 0 Attachment
      On Die, 2003-03-04 at 10:25, Bram Moolenaar wrote:

      > Since we do HAVE_GETRLIMIT on linux, and threading may cause a hang, it
      > might be better to rely on mch_stackcheck() and not use the alternate
      > stack. Thus use your #ifdef around setting sa.sa_flags, also for
      > SIGSEGV.

      Yes, that sounds good to me.

      > /* Setup to use the alternate stack for the signal function. */
      > sa.sa_handler = func_deadly;
      > sigemptyset(&sa.sa_mask);
      > # if defined(__linux__) && defined(_REENTRANT)
      > /* Linux with kernel 2.2 has a bug in thread handling in
      > * combination with using the alternate stack: library functions
      > * will use the ordinary stack anyway, causing a SEGV signal,
      > * which recursively calls deathtrap and hangs. */
      > sa.sa_flags = 0;
      > # else
      > sa.sa_flags = SA_ONSTACK;
      > # endif
      > sigaction(signal_info[i].sig, &sa, NULL);
      >
      > Does that look OK?

      Yep. But I'd change the wording of the comment to:

      /* On Linux, glibc compiled for minimum kernel 2.2 has a bug in
      * thread handling in combination with using the alternate stack:
      * pthread library functions try to use the stack pointer to
      * identify the current thread, causing a SEGV signal, which
      * recursively calls deathtrap and hangs. */

      Otherwise people might get confused since Linux 2.2 is quite rare on
      desktop systems these days.

      --Daniel
    Your message has been successfully submitted and would be delivered to recipients shortly.