Your application doesn't catch the `SIGTERM` signal while blocked on `QTextStream(stdin).readLine()` because `readLine()` is a blocking call, preventing the Qt event loop or signal handler from running.

Solution: Use `QSocketNotifier` to monitor `stdin` asynchronously instead of blocking on `readLine()`, or configure `sigaction` with `SA_RESTART` unset to allow signals to interrupt the blocking call.
phrazle