Changeset 70087b9


Ignore:
Timestamp:
May 24, 2010, 8:22:54 PM (10 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
release-1.6
Children:
51a56b3
Parents:
c088c53
git-author:
Anders Kaseorg <andersk@mit.edu> (05/05/10 23:21:05)
git-committer:
Nelson Elhage <nelhage@mit.edu> (05/24/10 20:22:54)
Message:
Mask all handled signals while running pre-select actions.

This closes the race condition where a signal could be delivered just
before the pselect() call, which hangs until the next event.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-by: Nelson Elhage <nelhage@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • select.c

    r2a17b63 r70087b9  
    273273
    274274  sigemptyset(&set);
     275  sigaddset(&set, SIGWINCH);
     276  sigaddset(&set, SIGALRM);
     277  sigaddset(&set, SIGPIPE);
     278  sigaddset(&set, SIGTERM);
     279  sigaddset(&set, SIGHUP);
    275280  sigaddset(&set, SIGINT);
    276281  sigprocmask(SIG_BLOCK, &set, oldmask);
Note: See TracChangeset for help on using the changeset viewer.