VirtualBox

Changeset 2784 in kBuild for trunk/src/kash


Ignore:
Timestamp:
May 24, 2015 5:29:04 PM (10 years ago)
Author:
bird
Message:

shinstance.c: the forked off child process doesn't have any children, of course. Fixes spin-for-ever situation on windows.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kash/shinstance.c

    r2781 r2784  
    928928#endif
    929929
    930     /* child: update the pid */
     930    /* child: update the pid and zap the children array */
    931931    if (!pid)
     932    {
    932933# ifdef _MSC_VER
    933934        psh->pid = _getpid();
     
    935936        psh->pid = getpid();
    936937# endif
     938        psh->num_children = 0;
     939    }
    937940
    938941    TRACE2((psh, "sh_fork -> %d [%d]\n", pid, errno));
     
    980983    else if (psh->num_children <= MAXIMUM_WAIT_OBJECTS)
    981984    {
    982         HANDLE ahChildren[64];
     985        HANDLE ahChildren[MAXIMUM_WAIT_OBJECTS];
    983986        for (i = 0; i < psh->num_children; i++)
    984987            ahChildren[i] = psh->children[i].hChild;
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