<commit_before>#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>

struct threads{
	pthread_t		id;
	int				num;
	int				pipeline[2];
};

int func(void *arg){

	struct threads	*thread = arg;
	char buf;

	fprintf(stdout, "Hello World from %d\n", thread->num);

	while(read(thread->pipeline[0], &buf, 1) > 0)
		fprintf(stdout, "%c", buf);
	fprintf(stdout, "\n");
	close(thread->pipeline[0]);

	return EXIT_SUCCESS;
}
<commit_msg>close writting side before reading<commit_after>#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>

struct threads{
	pthread_t		id;
	int				num;
	int				pipeline[2];
};

int func(void *arg){

	struct threads	*thread = arg;
	char buf;

	close(thread->pipeline[1]);

	fprintf(stdout, "Hello World from %d\n", thread->num);

	while(read(thread->pipeline[0], &buf, 1) > 0)
		fprintf(stdout, "%c", buf);
	fprintf(stdout, "\n");
	close(thread->pipeline[0]);

	return EXIT_SUCCESS;
}

{'fraction_non_alphanumeric': 0.17736670293797607, 'fraction_numerical': 0.011969532100108813, 'mean_word_length': 4.575757575757576, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 18, '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': '2033293', 'n_tokens_mistral': 383, 'n_tokens_neox': 368, 'n_words': 87}