Skip to content

Tag: kill

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 t…

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 som…

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.…

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 …