Why kill [pid] does not work?

I face a problem trying to kill a pid. I have a ruby pid that i try to kill but nothing happens.lsof -i (service list)ruby 282 xxx 3u IPv4 0xffffff80111f4c20 0t0 TCP localhost:49206 (LISTEN)ruby 282 xxx 9u IPv4 0xffffff800fa29c20 0t0 TCP *:hbci (LISTEN)ruby 282 xxx 10u IPv4 0xffffff80115406c0 0t0 TCP localhost:hbci->localhost:49400 (ESTABLISHED)kill 282The same things ps -A | grep ruby282 ?? 0:24.54 /xxx/.rvm/gems/ruby-1.9.2-p320/gems/ruby-debug-ide-0.4.17.beta14/bin/rdebug-ide 324 ttys000 ...Read more

nsxpcconnection - Kill XPC when parent app is still running

My parent application uses helper XPC to achieve some task T1. XPC service is implemented using NSXPCConnection.Once the task is complete I don’t need this XPC to be alive. Hence, the parent process calls invalidate on NSXPCConnection object.But, the XPC is still alive even if the connection is invalid. I can see it getting listed in Activity Monitor.How do I kill this XPC when parent app is still running and it does not require XPC to be alive?...Read more

hostname - How to get the host name of kill signal sender in systemtap script

all,I encounter a problem when use systemtap script.I don't know how to get the host name of kill signal sender in systemtap script.for example. I am execute kill -9 xclock_process_pid in server 'sf1'. at the same time, I run 1.stap -x xclock_process_pid to monitor xclock, is there any method to obtain the server name 'sf1' in systemtap script when send a kill -9 xclock_process_pid in 'sf1'?but I am encounter some problem. my 1.stap is shown below: #!/usr/bin/env stapfunction hostname:string () %{ STAP_RETURN(current->nsproxy->uts_ns-&...Read more

Trying to kill a nohup process that changes PIDs

I list the PID and then try to kill it using:nohup server &kill <PID>However, I keep getting the error:nohup: failed to run command ‘server’: No such file or directoryThis is because the PID keeps changing! When I try to kill the current PID, the nohup process is suddenly another PID! Below is a screenshot of the process continually chainging PIDs....Read more

kill - After forced quit, "killall Finder" says "No matching processes..." but PID still exists?

Here's one for ya. Upon a forced quit of the Finder with unsuccessful relaunch, "killall Finder" in terminal returns:"No matching processes belonging to you were found"Oddly enough, the PID for finder does actually show up after a "ps -A" to reveal all processes. But the time is perpetually listed as 0:00:00, upon repeated PID listings. I tried the following to manually launch it:open /System/Library/CoreServices/Finder.appBut it puked:LSOpenFromURLSpec() failed with error -600 for the file /System/Library/CoreServices/Finder.app.Any other idea...Read more

embedded system kill process: Is it safe? Why not?

I am designing a networked embedded application, that can span multiple machines. The applications is divided between these machines.Now, when it comes to exerting explicit control on this system, there are two options:(1). A nicely managed strategy in which the application nicely releases resources, and goes out. No memory leaks, and it all looks good.(2). I am facing criticism from people on the managed approach: Why is it not just as good to kill the process, in each machine separately? My only defence is that it is not nice, and may leave t...Read more

what's "sure kill" when talking about NFS mount option?

In the following linkhttp://www.faqs.org/docs/Linux-HOWTO/NFS-HOWTO.htmlIt said a process is not killable except by a "sure kill", but what's sure kill? hard (NFS client mount option) The program accessing a file on a NFS mounted file system will hang when the server crashes. The process cannot be interrupted or killed (except by a "sure kill") unless you also specify intr. When the NFS server is back online the program will continue undisturbed from where it was. We recommend using hard,intr on all NFS mounted file systems....Read more

kill - Is uninterruptible sleep the only case?

French wikipedia say: Un processus en sommeil ininterruptible ne peut s'arrêter (ni libérer ses ressources) même lorsque SIGKILL apparaît. Il s'agit d'un des rares cas dans lequel un système UNIX doit être redémarré afin de régler un problème logiciel temporaire.In english (c/p from old revision of english wikipedia): An uninterruptibly sleeping process may not terminate (and free its resources) even when sent SIGKILL. This is one of the few cases in which a UNIX system may have to be rebooted to solve a temporary software problem.It im...Read more

Kill process by fuser instead of pidfile?

Recently I developed the habit of killing processes with fuser -k -n tcp $PORTwhich can hardly kill the wrong process. I prefer this over fiddling with a pidfile that may or may not be still there or may or may not contain the correct pid (OK, I am a bit dramatic here :-)Yet the typical stop script I stumble over still uses a pidfile.Am I missing an important feature of the pidfile approach or a misfeature of the fuser approach. My best guess is that fuser is not available. Though judging by search engine results, bsd, debian, suse, centos, aix...Read more

kill - Killing two-part process with && by PID

I have a bash script where I am sleeping and then executing a command in a background process. For examplesleep 30s && ./script.sh &If I grep ps for "sleep 30s" and kill the process associated with it, will it also prevent ./script.sh from running, or will my script.sh be executed with a separate PID?...Read more

history - Why is the UNIX system call kill named 'kill'?

I am curious about the history of the name, it seems to me that the 'kill' system call could have been named 'signal', and the 'signal' system call could have been named 'handle'.I was wondering whether the original use of the system call might have been simply to kill another process, and its usage was perhaps broadened to a more general signal-sending mechanism as the system developed - but this is speculation on my part.Does anyone know?...Read more

Give group the right to send kill signals

I have a process that a user1 runs. And I need to grant all the group members the right to send some kill signal to it. So far, I always get this output:myProcess(13919): Operation not permitted myProcess: no process killed From what I had found on the internet, Linux architecture is intended to not allow other users to send kill signals to a process. But, if I am ok with it, can I grant these rights?UpdateAs pointed out by muru, I should mention that my group and I are not sudoers....Read more

kill - Default exit code when process is terminated?

When a process is killed with a handle-able signal like SIGINT or SIGTERM but it does not handle the signal, what will be the exit code of the process?What about for unhandle-able signals like SIGKILL?From what I can tell, killing a process with SIGINT likely results in exit code 130, but would that vary by kernel or shell implementation?$ cat myScript#!/bin/bashsleep 5$ ./myScript<ctrl-c here>$ echo $?130I'm not sure how I would test the other signals...$ ./myScript &$ killall myScript$ echo $?0 # duh, that's the exit code of killal...Read more