<commit_before>#define  _XOPEN_SOURCE     700
#include <unistd.h>
#include <signal.h>
#include <sys/wait.h>

static void  reap(char *argv[]);
static pid_t spawn_child(char *argv[]);

extern void  init(char *argv[]);


int main(int argc, char *argv[])
{
    if (getpid() == 1)
        /* parent process */
        reap(argv);
    else
        /* child process */
        init(argv + 1);
}

static void reap(char *argv[])
{
    pid_t child = 0;
    for (;;) {
        if (!child)
            child = spawn_child(argv);

        pid_t died = wait(NULL);
        if (died > 0 && died == child)
            child = 0;
    }
}

static pid_t spawn_child(char *argv[])
{
    /* block signals here so child process can't wreak havoc for parent */
    sigset_t sigs;
    sigfillset(&sigs);<commit_msg>Style fixes.<commit_after>#define  _XOPEN_SOURCE     700
#include <unistd.h>
#include <signal.h>
#include <sys/wait.h>

static void  reap(char *argv[]);
static pid_t spawn(char *argv[]);

extern void  init(char *argv[]);


int main(int argc, char *argv[])
{
    if (getpid() == 1)
        /* parent process */
        reap(argv);
    else
        /* child process */
        init(argv + 1);
    return 1;
}

static void reap(char *argv[])
{
    pid_t child = 0;
    for (;;) {
        if (!child)
            child = spawn(argv);

        pid_t died = wait(NULL);
        if (died > 0 && died == child)
            child = 0;
    }
}

static pid_t spawn(char *argv[])
{
    /* block signals so child process can't wreak havoc for parent */
    sigset_t sigs;
    sigfillset(&sigs);
{'fraction_non_alphanumeric': 0.1475826972010178, 'fraction_numerical': 0.010814249363867684, 'mean_word_length': 2.290794979079498, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7603257', 'n_tokens_mistral': 570, 'n_tokens_neox': 543, 'n_words': 155}