VirtualBox

Changeset 23869 in vbox for trunk/src/libs/xpcom18a4/nsprpub


Ignore:
Timestamp:
Oct 19, 2009 2:32:57 PM (15 years ago)
Author:
vboxsync
Message:

fix/hack waitpid issues for unix platforms: racing of RT and xpcom, make waitpid for terminated child processes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/nsprpub/pr/src/md/unix/uxproces.c

    r23573 r23869  
    674674        while (1) {
    675675            do {
     676#ifdef VBOX
     677                /*
     678                 * make sure we wait only for child of our group
     679                 * to ensure we do not interfere with RT
     680                 */
     681                pid = waitpid((pid_t) 0, &status, 0);
     682#else
    676683                pid = waitpid((pid_t) -1, &status, 0);
     684#endif
    677685            } while ((pid_t) -1 == pid && EINTR == errno);
    678686
     
    764772        while (1) {
    765773            do {
     774#ifdef VBOX
     775                /*
     776                 * make sure we wait only for child of our group
     777                 * to ensure we do not interfere with RT
     778                 */
     779                pid = waitpid((pid_t) 0, &status, WNOHANG);
     780#else
    766781                pid = waitpid((pid_t) -1, &status, WNOHANG);
     782#endif
    767783            } while ((pid_t) -1 == pid && EINTR == errno);
    768784            if (0 == pid) break;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette