The issue you're encountering arises because when you use QTextStream(stdin).readline() in your Qt console application, it internally calls the standard C function fgets() to read input. While this method is blocking (i.e., it waits for user input), it can also cause the signal handler to not be triggered when the signal is sent (in your case, SIGTERM). This behavior is due to how signals are handled in Unix-like systems and how they interact with blocking system calls like fgets() or QTextStream::readline() Drive Mad Game