Questions tagged [sigint]
9 questions
17
votes
4 answers
Less interrupting in less
I often pipe program output to less, e.g.
produce_output | less
This works great, until produce_output produces large amounts of output. If I search for some text that is deep into the file, less reports
Calculating line numbers... (interrupt to…
Ed McMan
- 520
4
votes
1 answer
Behavior of SIGINT with Bash
I am running this Bash script:
#!/bin/bash
for i in $(seq 1 100);
do
echo $i
sleep 1
done
When I issue kill -INT nothing happens -- the script keeps running. If I issue kill -TERM , the script and the sleep command are both…
rama
- 51
2
votes
1 answer
Ctrl+C to break an infinite loop and then do something outside the loop in a bash script without exiting?
I have read so many answers and they all just suggest to kill the script or send it to the background etc. What I want is
while true
do
something...
if(ctrl+c is pressed break)
done
echo "Out of the loop"
I am outside the loop because ctrl+c was…
quanta
- 141
1
vote
1 answer
After a command ran in GNU parallel exits, how can I automatically send SIGINT to another command ran by the same instance of GNU parallel?
This is the command I'm running:
parallel -u ::: 'watch -n 0.1 /home/cringeposter/zfs-mount.sh' 'watch -n 0.1 drill graph.microsoft.com' 'rclone bisync onedrive: /home/cringeposter/zfs/onedrive --verbose --check-access --ignore-checksum' 'rclone…
cringeposter
- 13
- 2
1
vote
2 answers
Pass SIGINT through bash script to application
I have a Linux application, written in C++, which traps the SIGINT interrupt in order to do some final cleanup before exiting. I call this application within a bash script. Now, when I type control-C with the bash script running in the foreground,…
sizzzzlerz
- 141
0
votes
1 answer
Linux. MySQL command-line client. Set '--sigint-ignore' option forever
I think Ctrl+C is required sometimes but I can't remember I needed it. Sometimes I'm trying to copy output text by pressing that "hotkey" automatically and losing db connection instead. It is very annoying and I would like to disable SIGINT sending…
Carter
- 215
0
votes
1 answer
Ctrl+C incorrectly mapped in Ubuntu Linux 10.04 LTS
I was playing around with my keyboard shortcuts and accidentally mapped a command to the Ctrl+C shortcut. Now I can't stop programs running in the terminal with Ctrl+C and I have no idea of how to restore this functionality.
Any suggestions?
vette982
- 143
0
votes
2 answers
Expect: Modify Ctrl-C Behavior
While exec is running a program, I would like Ctrl-C to terminate the program and resume the script, instead of killing the script. What's the best way of accomplishing that?
LaC
- 3,019
0
votes
1 answer
windows console (cmd.exe or powershell) gets sent sigint on focus?
I just realized that my cmd/powershell windows get sent a sigint when they regain focus (via clicking). On powershell, this clearly displays itself as a red '^C'; on cmd, one can check this by starting e.g. Python; upon focus Python displays a…
antony
- 161