[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

pselect



Moin!

  Does anyone know if we have some problems with pselect on kfreebsd?
Emacs changed from [0] to [1] and since then console emacs just hangs in
a loop with [2]

  Christoph

[0] emacs24-24.2+1
        while (! detect_input_pending ())
          {
            struct timeval current;
            struct timeval timeout;

            EMACS_GET_TIME (current);

            /* Break if result would be negative.  */
            if (timeval_subtract (&current, wakeup, current))
              break;

            /* How long `select' should wait.  */
            timeout.tv_sec = 0;
            timeout.tv_usec = 10000;

            /* Try to wait that long--but we might wake up sooner.  */
            select (0, NULL, NULL, NULL, &timeout);
          }

[1] emacs24-24.3+1
        while (! detect_input_pending ())
          {
            EMACS_TIME current = current_emacs_time ();
            EMACS_TIME timeout;

            /* Break if result would not be positive.  */
            if (EMACS_TIME_LE (wakeup, current))
              break;

            /* How long `select' should wait.  */
            timeout = make_emacs_time (0, 10 * 1000 * 1000);

            /* Try to wait that long--but we might wake up sooner.  */
            pselect (0, NULL, NULL, NULL, &timeout, NULL);
          }

[2]
  3359 100358 emacs24-lucid CALL  clock_gettime(0,0x7fffffffc330)
  3359 100358 emacs24-lucid RET   clock_gettime 0
  3359 100358 emacs24-lucid CALL  clock_gettime(0,0x7fffffffc380)
  3359 100358 emacs24-lucid RET   clock_gettime 0
  3359 100358 emacs24-lucid CALL
  pselect(0x5,0x7fffffffc620,0x7fffffffc6a0,0,0x7fffffffc550,0)
  3359 100358 emacs24-lucid RET   pselect 1
  3359 100358 emacs24-lucid CALL  clock_gettime(0,0x7fffffffc330)
  3359 100358 emacs24-lucid RET   clock_gettime 0
  3359 100358 emacs24-lucid CALL  clock_gettime(0,0x7fffffffc380)
  3359 100358 emacs24-lucid RET   clock_gettime 0
  3359 100358 emacs24-lucid CALL
  pselect(0x5,0x7fffffffc620,0x7fffffffc6a0,0,0x7fffffffc550,0)
  3359 100358 emacs24-lucid RET   pselect 1


Reply to: