If I use
Ctrl-C in a screen I ran the "normal way" using
screen -S screen_name, it behaves as expected meaning it will interrupt whatever command the screen is running but won't terminate the screen itself.
However, when I run screen in detached mode using
screen -dmS screen_name command, it works fine but when I reattach the screen,
Ctrl-C will terminates the screen itself.
How can I prevent
Ctrl-C from terminating the screen?