kill -0
Have you seen kill -0 before? I haven’t since very recent.
Here is what info kill has to say about it.
kill [-s SIGNAL | —signal SIGNAL | -SIGNAL] PID…
kill [-l | —list | -t | —table] [SIGNAL]…
The first form of the `kill’ command sends a signal to all PID
arguments. The default signal to send if none is specified is `TERM’.
The special signal number `0’ does not denote a valid signal, but can
be used to test whether the PID arguments specify processes to which a
signal could be sent.
So what’s the use for it?
I found it useful in bash scripts if you wan’t to make sure that processes are not overlapping.
$ kill -0 >/dev/null 2>&1 6008
$ echo $?
0
$ kill -0 >/dev/null 2>&1 6009
$ echo $?
1
As you can see in that case 6008 existed and 6009 not.
I was trying to compare VirtualBox with VMware Fusion to see if I should spend money or not. Well as you can see VirtualBox was knocked out.
Will continue experiment with no GUI installations, as most of a time I want shell access.
Google Chrome on Linux
If you want to run this very nice browser don’t go for lunchpad option.
You’ll better subscribe to this dev-channel.