Subversion Repositories DevTools

Rev

Rev 5700 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5700 Rev 5710
Line 129... Line 129...
129
    */
129
    */
130
    {
130
    {
131
        size_t length = 0;
131
        size_t length = 0;
132
        int start;
132
        int start;
133
        char join = 0;
133
        char join = 0;
-
 
134
//        #define JOB_OBJECT_LIMIT_BREAKAWAY_OK 0x00000800
-
 
135
        JOBOBJECT_BASIC_LIMIT_INFORMATION basicLimits = {0, 0, JOB_OBJECT_LIMIT_BREAKAWAY_OK};
-
 
136
        JOBOBJECT_EXTENDED_LIMIT_INFORMATION extendedLimits = {basicLimits};
134
 
137
 
135
        /*
138
        /*
136
        **  Calc required size of the command line
139
        **  Calc required size of the command line
137
        **  Allow for two " and 1 space per argument
140
        **  Allow for two " and 1 space per argument
138
        */
141
        */
Line 167... Line 170...
167
    hJobObject = CreateJobObject(NULL, NULL);
170
    hJobObject = CreateJobObject(NULL, NULL);
168
    if (! hJobObject)
171
    if (! hJobObject)
169
            ErrorExitMsg(EXIT_CANCELED, "CreateJobObject");
172
            ErrorExitMsg(EXIT_CANCELED, "CreateJobObject");
170
 
173
 
171
    /*
174
    /*
-
 
175
    **  Set extended information to allow job breakaway
-
 
176
    **  Required so that we can have a timeout job within a timeout job
-
 
177
    */
-
 
178
    if (!SetInformationJobObject(hJobObject, JobObjectExtendedLimitInformation, &extendedLimits, sizeof(JOBOBJECT_EXTENDED_LIMIT_INFORMATION)))
-
 
179
        ErrorExitMsg(EXIT_CANCELED, "Error setting job object information.");
-
 
180
 
-
 
181
    /*
172
    ** Register a handler for control-C
182
    ** Register a handler for control-C
173
    */
183
    */
174
    if ( !SetConsoleCtrlHandler( KillJob, TRUE))
184
    if ( !SetConsoleCtrlHandler( KillJob, TRUE))
175
    {
185
    {
176
        ErrorExitMsg(EXIT_CANCELED, "SetConsoleCtrlHandler");
186
        ErrorExitMsg(EXIT_CANCELED, "SetConsoleCtrlHandler");