<commit_before>Tini - A tiny but valid `init` for containers
=============================================

Tini is the simplest `init` you could think of.

All Tini does is spawn a single child (Tini is meant to be run in a container),
and wait for it to exit all the while reaping zombies.

Using Tini
----------

Add Tini to your container, and make it executable.

It's a very small file (10KB range). All Tini depends on is libc.

Once you've added Tini, use it like so:

     tini -- your_program and its args

Note that you *can* skip the `--` above if your program only accepts
positional arguments, but it's best to get used to using it.<commit_msg>Improve README<commit_after>Tini - A tiny but valid `init` for containers
=============================================

Tini is the simplest `init` you could think of.

All Tini does is spawn a single child (Tini is meant to be run in a container),
and wait for it to exit all the while reaping zombies and performing
signal forwarding.


Using Tini
----------

Add Tini to your container, and make it executable.

It's a very small file (10KB range). All Tini depends on is libc.

Once you've added Tini, use it like so:

     tini -- your_program and its args

Note that you *can* skip the `--` above if your program only accepts
positional arguments, but it's best to get used to using it.

If you try to use positional arguments with Tini without using `--`, you'll
get an error similar to:

    ./tini: invalid option -- 'c'


Understanding Tini
------------------

After spawning your process, Tini will wait for signals and forward those
to the child process (except for `SIGCHLD` and `SIGKILL`, of course).

Besides, Tini will reap potential zombie processes every second.


Debugging
---------

If something isn't just like you expect, consider increasing the verbosity
level (up to 3):

    tini -v   -- bash -c 'exit 1'
    tini -vv  -- true
    tini -vvv -- pwd
{'fraction_non_alphanumeric': 0.12784679089026915, 'fraction_numerical': 0.003105590062111801, 'mean_word_length': 3.2297592997811817, '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': '1804768', 'n_tokens_mistral': 565, 'n_tokens_neox': 526, 'n_words': 297}