Changeset c3031f3


Ignore:
Timestamp:
May 6, 2010, 12:59:30 AM (10 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.7, release-1.8, release-1.9
Children:
6cc3306
Parents:
1b5b975
git-author:
Anders Kaseorg <andersk@mit.edu> (05/05/10 23:21:05)
git-committer:
Anders Kaseorg <andersk@mit.edu> (05/06/10 00:59:30)
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 rc3031f3  
    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.