<commit_before>#!/bin/sh

if test -f  /engines/var/run/flags/sig_term
	rm -f /engines/var/run/flags/sig_term
fi 

if test -f  /engines/var/run/flags/termed
	rm -f /engines/var/run/flags/termed
fi 
if test -f  /engines/var/run/flags/sig_hup
	rm -f /engines/var/run/flags/sig_hup
fi 

if test -f  /engines/var/run/flags/huped
	rm -f /engines/var/run/flags/huped
fi 
if test -f  /engines/var/run/flags/sig_quit
	rm -f /engines/var/run/flags/sig_quit
fi 

if test -f  /engines/var/run/flags/quited
	rm -f /engines/var/run/flags/quited
fi 


trap_term()
	{
	SIGNAL=15
	export SIGNAL
	touch /engines/var/run/flags/sig_term
		
	if test -f $PID_FILE
		then
		kill -TERM `cat   $PID_FILE `
			if test -f /home/_signal.sh
				then
					sudo /home/_signal.sh $SIGNAL	$PID_FILE				 	
			fi
		touch /engines/var/run/flags/termed	 
			 wait `cat   $PID_FILE `
		fi

	}
trap_hup()
	{
	SIGNAL=1
	export SIGNAL
	touch /engines/var/run/flags/sig_hup
	
		if test -f $PID_FILE
		kill -HUP `cat   $PID_FILE `
			then
				if test -f /home/_signal.sh
					then
						sudo /home/_signal.sh $SIGNAL	$PID_FILE	

				fi
			 touch /engines/var/run/flags/huped
			 wait `cat   $PID_FILE `
		fi
		
	}

trap_quit()
	{
	SIGNAL=15
	export SIGNAL
	touch /engines/var/run/flags/sig_quit
		if test -f $PID_FILE
			then
				kill -QUIT `cat   $PID_FILE `
				if test -f /home/_signal.sh
					then
						/home/_signal.sh $SIGNAL	$PID_FILE	
				fi
				
			 	touch /engines/var/run/flags/quited
			 	wait `cat   $PID_FILE `
		fi
	
	}
	
	trap trap_term 15 
	trap trap_hup  1
	trap trap_quit 3
	
		if test -f $PID_FILE
	 		then
	 			echo "Warning stale $PID_FILE"
	 			rm -f $PID_FILE
		fi
	 			
	

	<commit_msg>leave wait for init (need to cycle on HUP)<commit_after>#!/bin/sh

if test -f  /engines/var/run/flags/sig_term
	rm -f /engines/var/run/flags/sig_term
fi 

if test -f  /engines/var/run/flags/termed
	rm -f /engines/var/run/flags/termed
fi 
if test -f  /engines/var/run/flags/sig_hup
	rm -f /engines/var/run/flags/sig_hup
fi 

if test -f  /engines/var/run/flags/huped
	rm -f /engines/var/run/flags/huped
fi 
if test -f  /engines/var/run/flags/sig_quit
	rm -f /engines/var/run/flags/sig_quit
fi 

if test -f  /engines/var/run/flags/quited
	rm -f /engines/var/run/flags/quited
fi 


trap_term()
	{
	SIGNAL=15
	export SIGNAL
	touch /engines/var/run/flags/sig_term
		
	if test -f $PID_FILE
		then
		kill -TERM `cat   $PID_FILE `
			if test -f /home/_signal.sh
				then
					sudo /home/_signal.sh $SIGNAL	$PID_FILE				 	
			fi
		touch /engines/var/run/flags/termed	 			
		fi

	}
trap_hup()
	{
	SIGNAL=1
	export SIGNAL
	touch /engines/var/run/flags/sig_hup
	
		if test -f $PID_FILE
		kill -HUP `cat   $PID_FILE `
			then
				if test -f /home/_signal.sh
					then
						sudo /home/_signal.sh $SIGNAL	$PID_FILE	

				fi
			 touch /engines/var/run/flags/huped			
		fi
		
	}

trap_quit()
	{
	SIGNAL=15
	export SIGNAL
	touch /engines/var/run/flags/sig_quit
		if test -f $PID_FILE
			then
				kill -QUIT `cat   $PID_FILE `
				if test -f /home/_signal.sh
					then
						/home/_signal.sh $SIGNAL	$PID_FILE	
				fi				
			 	touch /engines/var/run/flags/quited
		fi
	
	}
	
	trap trap_term 15 
	trap trap_hup  1
	trap trap_quit 3
	
		if test -f $PID_FILE
	 		then
	 			echo "Warning stale $PID_FILE"
	 			rm -f $PID_FILE
		fi
	 			
	

	
{'fraction_non_alphanumeric': 0.1104350471554609, 'fraction_numerical': 0.005476118040766657, 'mean_word_length': 2.1645813282001924, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '123061', 'n_tokens_mistral': 1715, 'n_tokens_neox': 1429, 'n_words': 325}