Tagged Questions
6
votes
2answers
112 views
Decode Flags for Kill Command
I am new to Shell Scripting.
I saw this Command on a Book for Linux shell Scripting
$ kill -HUP 1234 >killout.txt 2>killerr.txt
I know what the command does, but i am not able to understand ...
2
votes
1answer
56 views
Why is `kill -s INT <zsh PID>` behaving differently from `Ctrl-C`?
Starting with:
% donothing () { echo $$; sleep 1000000 }
% donothing
47139
If at this point I hit Ctrl-C at the same terminal that is controlling the shell, then the function donothing does indeed ...
2
votes
1answer
57 views
Chain commands with Control + C interrupt
I am trying to execute a program which loops indefinitely, and so must be forcibly interrupted. After executing the program, I want to delete it. I can do it in several steps:
./MyProg
Control + C
...
16
votes
1answer
488 views
How does systemd survive a kill -9?
Between the recent "Why does 'kill -9 0' end my console session" and "How to get a kernel panic" questions, I got a bur under my saddle and tried kill -9 1 on a mostly up-to-date Arch linux laptop. I ...
3
votes
1answer
142 views
What is the difference between exiting a process via Ctrl+C vs issuing a kill -9 command?
I know I can kill any process with kill -9 command . But sometimes i see that even if I have terminated a program with CTRL+C , the process doesn't get killed . So I want to know the difference ...
5
votes
1answer
230 views
`kill -s TERM` works, `kill -s ABRT` gets “Operation not permitted”
There is a process that I own whose documentation claims I can send SIGABRT to in order to get some debugging information. However, when I try to send SIGABRT, I get back "Operation not permitted".
I ...
2
votes
2answers
199 views
Why can't I kill a timeout called from a Bash script with a keystroke?
[Edit: This looks similar to some other questions asking how to kill all spawned processes – the answers all seem to be to use pkill. So the core of my question may be: Is there a way to propagate ...
5
votes
3answers
1k views
How can I kill and wait for background processes to finish in a shell script when I Ctrl+C it?
I'm trying to set up a shell script so that it runs background processes, and when I Ctrlc the shell script, it kills the children, then exits.
The best that I've managed to come up with is this. It ...
11
votes
3answers
405 views
How Can Terminal Emulators Kill Their Children After Recieving a SIGKILL?
From what I understand, SIGKILL cannot be caught. This would imply that a process does not have time to kill it's children before the OS destroys it. This can be demonstrated with a shell script.
...
0
votes
0answers
102 views
my code not able to display the catched signal result [closed]
my code here is intended to display the received signal that's it but its not working when i try to send the signal
kill -SIGUSR1 pid
or
kill -10 pid
or any other signals according to my ...
2
votes
2answers
387 views
Why would Ctrl-C behave differently than kill -2
I have a program which is supposed to handle SIGINT and gracefully shut down. When I run this program from a terminal without backgrounding it I can shut it down just fine using Ctrl-C. Inspecting the ...
5
votes
3answers
1k views
How to make `xargs` ignore child's exit and keep processing further
I sometimes run long xargs jobs overnight and it is really annoying to discover in the morning that xargs died somewhere in the middle, for example because of a segmentation fault in one single ...
2
votes
3answers
481 views
Killing other user processes
There are certain user environments in which we have to login during certain performance testing and and kill all the process running in that environment.
The environment names are like rswrk01, … up ...
19
votes
2answers
366 views
When you try to terminate a process for good, which option for “kill” should you use?
I am getting a lot of mixed messages from people, and was wondering if it there really is not much of a difference in what you use.
kill 'x'
killall 'x'
kill -9 'x'
These are some options I've been ...
19
votes
2answers
1k views
why would typing Ctrl+c twice stop a running process in Linux?
There are Linux programs, for example vlc, that recommend typing ctrl+c twice to kill their execution from a terminal if the program didn't stop after the first one.
Why would typing ctrl+c twice ...
3
votes
2answers
2k views
Program behavior when kill -HUP is recieved?
Is there a way to find out what will program do when it receives kill signal HUP?
Without simply running the command ofc :D
For example,
killall -HUP pppd will restart pppd
killall -HUP firefox ...
10
votes
3answers
8k views
How can I kill a <defunct> process whose parent is init?
Transmission is intermittently hanging on my NAS. If I send SIGTERM, it doesn't disappear from the process list and a <defunct> label appears next to it. If I send a SIGKILL, it still doesn't ...
