Sample Header Ad - 728x90

How to send SIGQUIT or SIGINT using bash shell to a shell script

0 votes
1 answer
100 views
According to BASH manual page, > When Bash receives a SIGINT, it breaks out of any executing loops. In > all cases, Bash ignores SIGQUIT. So if there was a shell script, started from bash shell, to which a SIGINT or SIGQUIT is sent via the following commands, they have no effect on the script. The script still keeps on running. $ /usr/bin/kill --verbose --signal SIGQUIT > sending signal 3 to pid > $ /usr/bin/kill --verbose --signal SIGINT > sending signal 2 to pid > So how can a SIGQUIT or SIGINT be sent from a bash interactive shell to a shell script that has been started by another bash shell? However if application or script is started from **systemd-user** then it receives both the signals SIGQUIT and SIGINT. SIGQUIT has the benefit of creating a core dump when the script or application exits.
Asked by KDM (116 rep)
Jun 3, 2025, 08:10 AM
Last activity: Jun 3, 2025, 12:31 PM