rem: pid_t pid;
add: pid_t pid, exited;
context: int MonitorLoop(int argc, char **argv){    pid_t pid;    char **child_argv= wmalloc(sizeof(char*)*(argc+2));    int i, status;    time_t last_start;    for (i= 0; i < argc; i++)        child_argv[i]= argv[i];    child_argv[i++]= "--for-real";    child_argv[i]= NULL;    for (;;)    {        last_start= time(NULL);        /* Start Window Maker */        pid= fork();        if (pid == 0)        {            execvp(child_argv[0], child_argv);            wsyserror(_("Error respawning Window Maker"));            exit(1);        }        else if (pid < 0)        {            wsyserror(_("Error respawning Window Maker"));            exit(1);        }        if (waitpid(pid, &status, 0) < 0)        {            wsyserror(_("Error during monitoring of Window Maker process."));            break;        }        child_argv[argc]= "--for-real-";        /* Check if the wmaker process exited due to a crash */        if (WIFSIGNALED(status) &&             (WTERMSIG(status) == SIGSEGV ||             WTERMSIG(status) == SIGBUS ||             WTERMSIG(status) == SIGILL ||             WTERMSIG(status) == SIGABRT ||             WTERMSIG(status) == SIGFPE))        {            /* If so, we check when was the last restart.             * If it was less than 3s ago, it's a bad sign, so we show             * the crash panel and ask the user what to do */            if (time(NULL) - last_start < 3)            {                if (showCrashDialog(WTERMSIG(status)) == 0)                  return 1;            }            wwarning(_("Window Maker exited due to a crash (signal %i) and will be restarted."),                     WTERMSIG(status));        }        else          break;    }    return 0;}