Changeset 3535a6e for functions.c


Ignore:
Timestamp:
May 23, 2011, 8:57:46 PM (13 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.10, release-1.8, release-1.9
Children:
257b9c4
Parents:
959cb85
git-author:
David Benjamin <davidben@mit.edu> (02/26/11 00:15:35)
git-committer:
David Benjamin <davidben@mit.edu> (05/23/11 20:57:46)
Message:
First go at sigwait-based signal handling

Instead of relying on pselect and signal masking to listen for signals,
which glib doesn't support, we spawn a dedicated signal thread that
loops in sigwait. These signals are posted back to the main message loop
which may handle them at will. This avoids the need for complex
reentrant code and sig_atomic_t.

This removes the final pre-select action.

SIGINT doesn't quite work right yet because we can no longer take it in
the middle of an event loop iteration.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • functions.c

    r1a30f05 r3535a6e  
    29952995      i--;
    29962996    }
     2997#if 0
     2998    /* FIXME!!! */
    29972999    owl_function_mask_sigint(NULL);
    29983000    if(owl_global_is_interrupted(&g)) {
     
    30043006    }
    30053007    owl_function_unmask_sigint(NULL);
     3008#endif
    30063009  }
    30073010  owl_mainwin_redisplay(owl_global_get_mainwin(&g));
     
    30863089          ret=ZLocateUser(zstr(user), &numlocs, ZAUTH);
    30873090
     3091#if 0
     3092          /* FIXME!! */
    30883093          owl_function_mask_sigint(NULL);
    30893094          if(owl_global_is_interrupted(&g)) {
     
    30963101
    30973102          owl_function_unmask_sigint(NULL);
     3103#endif
    30983104
    30993105          if (ret!=ZERR_NONE) {
Note: See TracChangeset for help on using the changeset viewer.