<commit_before># CuteHMI - Daemon

Non-GUI program, which allows one to run QML project in the background.

Currently only Linux is supported.

Use `--project` command line option to specify the QML project file to open.
For example to run *CountDaemon* example use following command.

```
cutehmi_daemon --project="examples/CountDaemon/Main.qml"
```
Read system logs to investigate whether daemon is running (e.g. `journalctl -n20` on a system with *systemd*).

One may use `--app` option to tell the program to work as a foreground process (this can be useful when testing projects).

```
cutehmi_daemon --project="examples/CountDaemon/Main.qml" --app
```

You can use `--help` command line argument to see the list of all possible command line options.


## Signals

Under Unix daemon will respond to signals in a following way.

- SIGTERM tells daemon to gracefully quit with exit code set to EXIT_SUCCESS (0 on almost all systems).
- SIGINT tells daemon to gracefully quit, but exit code will be set to 128 + signal code.
- SIGQUIT causes violent termination and exits via abort.
- SIGHUP attempts to reload the project as if daemon has been restarted.<commit_msg>Update instructions.<commit_after># CuteHMI - Daemon

Non-GUI program, which allows one to run QML project in the background.

Currently only Linux is supported.

Use `--project` command line option to specify the QML project file to open.
For example to run *CountDaemon* example use following command.

```
cutehmi_daemon --project="examples/CountDaemon/Main.qml"
```
Fore debug builds use `cutehmi_daemon_debug` instead of `cutehmi_daemon`. Read system logs to investigate whether daemon is running
(e.g. `journalctl -n20` on a system with *systemd*).

One may use `--app` option to tell the program to work as a foreground process (this can be useful when testing projects).

```
cutehmi_daemon --project="examples/CountDaemon/Main.qml" --app
```

You can use `--help` command line argument to see the list of all possible command line options.


## Signals

Under Unix daemon will respond to signals in a following way.

- SIGTERM tells daemon to gracefully quit with exit code set to EXIT_SUCCESS (0 on almost all systems).
- SIGINT tells daemon to gracefully quit, but exit code will be set to 128 + signal code.
- SIGQUIT causes violent termination and exits via abort.
- SIGHUP attempts to reload the project as if daemon has been restarted.
{'fraction_non_alphanumeric': 0.07193054981397272, 'fraction_numerical': 0.004960727573377429, 'mean_word_length': 4.170940170940171, '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': '220942', 'n_tokens_mistral': 706, 'n_tokens_neox': 671, 'n_words': 344}