<commit_before>package control

import (
	"os/exec"
)

type PowerPointBroadcast struct {
	//Path to the presentation
	path string
	//Path to PowerPoint executable
	powerPoint string
	//Current running PowerPoint instance
	cmd *exec.Cmd
}

//Start starts PowerPoint in presentation mode.
func (b *PowerPointBroadcast) Start() error {
	if b.Status() {
		return nil
	}
	cmd := exec.Command(b.powerPoint, "/s", b.path)
	err := cmd.Start()
	if err != nil {
		return err
	}
	b.cmd = cmd
	return nil
}

//Kill ends Terminate signal to PowerPoint.
func (b *PowerPointBroadcast) Kill() error {
	if b.cmd == nil {
		return nil
	}
	err := b.cmd.Process.Kill()
	if err != nil {
		return err
	}
	b.cmd = nil
	return nil
}

func (b PowerPointBroadcast) Status() bool {
	if b.cmd == nil {
		return false
	}
	return true
}

func (b PowerPointBroadcast) Path() string {
	return b.path
}
<commit_msg>Added check if PowerPoint exited to PowerPointBroadcast.Status()<commit_after>package control

import (
	"os/exec"
)

type PowerPointBroadcast struct {
	//Path to the presentation
	path string
	//Path to PowerPoint executable
	powerPoint string
	//Current running PowerPoint instance
	cmd *exec.Cmd
}

//Start starts PowerPoint in presentation mode.
func (b *PowerPointBroadcast) Start() error {
	if b.Status() {
		return nil
	}
	cmd := exec.Command(b.powerPoint, "/s", b.path)
	err := cmd.Start()
	if err != nil {
		return err
	}
	b.cmd = cmd
	return nil
}

//Kill ends Terminate signal to PowerPoint.
func (b *PowerPointBroadcast) Kill() error {
	if !b.Status() {
		return nil
	}
	err := b.cmd.Process.Kill()
	if err != nil {
		return err
	}
	b.cmd = nil
	return nil
}

func (b PowerPointBroadcast) Status() bool {
	if b.cmd == nil {
		return false
	} else if b.cmd.ProcessState.Exited() {
		return false
	}
	return true
}

func (b PowerPointBroadcast) Path() string {
	return b.path
}

{'fraction_non_alphanumeric': 0.11497326203208556, 'fraction_numerical': 0.0, 'mean_word_length': 3.4231678486997636, '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': '5484850', 'n_tokens_mistral': 668, 'n_tokens_neox': 649, 'n_words': 212}