Changeset 2226


Ignore:
Timestamp:
Jul 6, 2005, 6:39:45 AM (20 years ago)
Author:
bird
Message:

o Reap embryos when the waiter thread is querying spm about

the death certificate. This, together with a tiny fix
in spawnve() cures the bad spm process leaks when spawning
non-libc processes seen with make when building libc.

Location:
trunk/src/emx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/ChangeLog.LIBC

    • Property cvs2svn:cvs-rev changed from 1.98 to 1.99
    r2225 r2226  
    88          orphants are adopted and killed by the init process.)
    99        o Added signal handler types for POSIX, BSD and GNU conformance.
     10        o Reap embryos when the waiter thread is querying spm about
     11          the death certificate. This, together with a tiny fix
     12          in __spawnve() cures the bad spm process leaks when spawning
     13          non-libc processes seen with make when building libc.
    1014
    11152005-07-04: knut st. osmundsen <bird-gccos2-spam@anduin.net>
  • trunk/src/emx/src/lib/sys/sharedpm.c

    • Property cvs2svn:cvs-rev changed from 1.31 to 1.32
    r2225 r2226  
    266266            pPrev = pNotify;
    267267            pNotify = pNotify->pNext;
     268        }
     269
     270        /*
     271         * If we didn't find the process, let's check the embryo list
     272         * since it's likely to be a non-libc process.
     273         *
     274         * This ASSUMES that this function is only called after death.
     275         */
     276        if (rc)
     277        {
     278            for (__LIBC_PSPMPROCESS pEmbryo = gpSPMHdr->apHeads[__LIBC_PROCSTATE_EMBRYO]; pEmbryo; pEmbryo = pEmbryo->pNext)
     279                if (pEmbryo->pid == pid)
     280                {
     281                    if (pEmbryo->cReferences == 0)
     282                        spmFreeProcess(pEmbryo);
     283                    else
     284                    {   /* Make zombie - needs a reference to work right. */
     285                        pEmbryo->cReferences++;
     286                        spmZombieOrFree(pEmbryo);
     287                    }
     288                    break;
     289                }
    268290        }
    269291
Note: See TracChangeset for help on using the changeset viewer.