Пример #1
0
void arch_reapChild(honggfuzz_t * hfuzz, fuzzer_t * fuzzer)
{
    /*
     * First check manually if we have expired children
     */
    arch_checkTimeLimit(hfuzz, fuzzer);

    /*
     * Now check for signals using wait4
     */
    int options = WUNTRACED;
    if (hfuzz->tmOut) {
        options |= WNOHANG;
    }

    for (;;) {
        int status = 0;
        while (wait4(fuzzer->pid, &status, options, NULL) != fuzzer->pid) {
            if (hfuzz->tmOut) {
                arch_checkTimeLimit(hfuzz, fuzzer);
                usleep(0.20 * 1000000);
            }
        }

        char strStatus[4096];
        LOG_D("Process (pid %d) came back with status: %s", fuzzer->pid,
              subproc_StatusToStr(status, strStatus, sizeof(strStatus)));

        if (arch_analyzeSignal(hfuzz, status, fuzzer)) {
            return;
        }
    }
}
Пример #2
0
void arch_reapChild(honggfuzz_t * hfuzz, fuzzer_t * fuzzer)
{
    /*
     * First check manually if we have expired childs
     */
    arch_checkTimeLimit(hfuzz, fuzzer);

    /*
     * Now check for signals using wait4
     */
    int options = WUNTRACED;
    if (hfuzz->tmOut) {
        options |= WNOHANG;
    }

    for (;;) {
        int status = 0;
        while (wait4(fuzzer->pid, &status, options, NULL) != fuzzer->pid) {
            if (hfuzz->tmOut) {
                arch_checkTimeLimit(hfuzz, fuzzer);
                usleep(0.20 * 1000000);
            }
        }
        LOGMSG(l_DEBUG, "Process (pid %d) came back with status %d", fuzzer->pid, status);

        if (arch_analyzeSignal(hfuzz, status, fuzzer)) {
            return;
        }
    }
}
Пример #3
0
void arch_reapChild(honggfuzz_t * hfuzz, fuzzer_t * fuzzer)
{
    int status;

    for (;;) {
#ifndef __WALL
#define __WALL 0
#endif
        while (wait4(fuzzer->pid, &status, __WALL, NULL) != fuzzer->pid) ;
        LOG_D("Process (pid %d) came back with status %d", fuzzer->pid, status);

        if (arch_analyzeSignal(hfuzz, status, fuzzer)) {
            return;
        }
    }
}