aerc/completer
Robin Jarry 7565a96525 address-book-cmd: ignore completion above 100 items
Avoid aerc from consuming all memory on the system if an address book
command returns 12 million addresses.

Read at most the first 100 lines and kill the command if it has not
finished. Display a warning in the logs for good measure.

The command is now assigned an different PGID (equal to its PID) to
allow killing it *and* all of its children. When the address book
command is a shell script that forks a process which never exits, it
will avoid killing the shell process and leaving its children without
parents.

Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
2022-11-02 13:18:19 +01:00
..
completer.go address-book-cmd: ignore completion above 100 items 2022-11-02 13:18:19 +01:00