You're right to be concerned.
Unix/Linux programs can register signal handling routines. These are called when they receive signals from the oparating system. You can see a full list of signals using man 7 signal
(or online here)
When you call kill
, it sends a signal to the process. The default signal is SIGTERM (this is equivalent to kill -15
, kill -TERM
or simply kill
) and the default behavior is for the app to quit. More sophisticated apps, probably including Skype, will set up a signal handling routine to properly close connections and perhaps save some session information.
When you do kill -9
(or its equivalent kill -KILL
) you send SIGKILL. As explained in the signal man page, "The signals SIGKILL and SIGSTOP cannot be caught, blocked, or ignored." This means that no signal handling routine will be executed and all the nice stuff that Skype's programmers put in to make their software behave on your system is ignored.
You should always try killing processes without -9
first. If that doesn't work, only then should you try kill -9
.
Aside: You may see that some daemons support kill -HUP
to reload
configuration file. These programs have signal handlers configured to
run when they receive SIGHUP. The kill
program is named in a way to
suggest that it always kills programs, but it's really just a way to
send signals.