I started a rather long
dd command that I would like to stop.
$ ps PID TTY TIME CMD 2006 ttys002 0:00.00 (dd)
dd process is shown in parenthesis without the argument.
kill produces no effect. Any idea on how to interrupt it?
The actual display of a process between
(…) means this process was detached from its controlling terminal (here
ttys002). This means that
^Z don't have anymore effect on it. It's behaving in daemon mode. This also means you can't send it a hangup either.
The correct way to deal with this case if unwanted, is to get the number of its parent process with:
ps lw | egrep '[ ](2006|PID)'
and kill it with a hangup signal:
kill -HUP xxxx
where xxxx is the process ID of the parent process.
Sadly, it appears that killing of zombies is all about killing the parent, and if the parent is
/sbin/launchd, you can kill it only with rebooting.
It would be a Very Bad Idea to kill
launchd, but you can tell it to HUP.
sudo kill -s HUP 1
That will cause launchd to reinitialize without restarting. This has worked for me in the past (wrt. removing zombie entries).