Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question
Tag: kill
I want to output ” Killed ~” to logfile when it kill -9
I want to output this message /usr/local/ex1.sh: line xxx: <PID> Killed ex2.sh >> $LOG_FILE 2>&1 to logfile. however The “ex1.sh” output /usr/local/ex1.sh: line xxx: <PID> Killed ex2.sh >> $LOG_FILE 2>&1 to console when I executed ex1.sh in console. The result that i want is that “ex1.sh” output to file, not that output to console. This source is “ex1.sh”. Why does
Signal Handler Behavior
I have just some questions about the system calls signal, kill and the signal handler. I have this code: 1) I don’t understand why the first printf in the first child, return -1 without a sleep(1) before…seems that the handler is executed after the beginning of the child. 2) When there is a kill to a child, after this, the
How to end a process in another linux terminal
Background Info: I’m trying to set up a remote display using a raspberry pi. Currently I’m using fbi (frame buffer image viewer) to display the image. The device is going to be controlled via ssh or web interface – not sure which, but definitely not from the actual device. The Problem is I cant seem to find an easy way
How to kill a process by its pid in linux
I’m new in linux and I’m building a program that receives the name of a process, gets its PID (i have no problem with that part) and then pass the PID to the kill command but its not working. It goes something like this: Can someone tell me why it isn’t killing it ? I know that there are some
Linux, waitpid, WNOHANG, child process, zombie
I running my program as daemon. Father process only wait for child process, when it is dead unexpected, fork and wait again. But when child process being killed with -9 signal, the child process goes to zombie process. waitpid should return the pid of child process immediately! But waitpid got the pid number after about 90 seconds, Here is the
Killing a screen without a specific session #
To create a screen, I am currently doing: That works perfectly, however killing it remotely with: Will reply with: This is due to the screen having {session#}.{screenname} It will work if done as: What solutions are possible? I’m not entirely sure that you can get the session# when you start the screen. This is all done remotely too. Answer I
BASH – weird characters coming out from a pipe
I have this script which simply kills an app If I write the kill command manually as a oneliner than it works. But I have to run it as a script which doesn’t work. So I tried to debug it and here is the result Why do I keep getting those strange characters on the kill line? How can i
What killed my process and why?
My application runs as a background process on Linux. It is currently started at the command line in a Terminal window. Recently a user was executing the application for a while and it died mysteriously. The text: Killed was on the terminal. This happened two times. I asked if someone at a different Terminal used the kill command to kill