<commit_before>/* A simple Lua module to suspend this process. */
#include <sys/types.h>
#include <signal.h>
#include <unistd.h>
#include <lua.h>
#include <lauxlib.h>

int l_kill(lua_State *L)
{
    /* Send ourselves the terminal stop signal, equivalent to normally
     * pressing ^Z. */
    kill(0, SIGTSTP);

    return 0;
}

/* The module's functions */
struct luaL_Reg functions[] = {
    { "kill", l_kill },
    { 0, 0 },<commit_msg>Handle the terminal resizing while suspended, by sending ourselves a SIGWINCH after restoring.<commit_after>/* A simple Lua module to suspend this process. */
#include <sys/types.h>
#include <signal.h>
#include <unistd.h>
#include <lua.h>
#include <lauxlib.h>

int l_kill(lua_State *L)
{
    /* Send ourselves the terminal stop signal, equivalent to normally
     * pressing ^Z. */
    kill(0, SIGTSTP);
    
    /* We may have been restored after a window change; pretend we've
     * received a WINCH. */
    kill(0, SIGWINCH);

    return 0;
}

/* The module's functions */
struct luaL_Reg functions[] = {
    { "kill", l_kill },
    { 0, 0 },
{'fraction_non_alphanumeric': 0.13456221198156681, 'fraction_numerical': 0.008294930875576038, 'mean_word_length': 3.2093023255813953, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '4776315', 'n_tokens_mistral': 378, 'n_tokens_neox': 363, 'n_words': 122}