Mailinglist Archive: opensuse (1523 mails)

< Previous Next >
Re: [opensuse] I have a small script to run several programs - pidgin, thunderbird, skype - by one click. How can I close them by one click?
  • From: Anders Johansson <ajh@xxxxxxxx>
  • Date: Sun, 21 Mar 2010 12:47:52 +0100
  • Message-id: <1269172072.30051.37.camel@xxxxxxxxxxxxx>
On Sun, 2010-03-21 at 13:18 +0200, arygroup@xxxxxxxxx wrote:
I didn't read the kill manual, but I have a doubt. Is killing a program
the same, as I close it in a legal way?

Depends on the program.

"kill" is really one of the worst named programs anywhere. It should
have been called something like "signal", because that is what it does -
it sends a signal to a given process. The signal INT (2) is the one sent
by a shell when you press ctrl-c for example.

Most signals can be "caught" by an application, and many programs will
catch the INT signal and do a controlled exit. Usually the same happens
with the TERM signal, which is the default one sent by the kill command
if you don't specify something else.

The HUP signal is used by some applications to trigger a re-read of the
configuration without having to restart. Postfix for example uses this

Some signals can't be caught, for example SIGKILL (9). If that is sent
to a process, it will exit immediately and no further instructions from
it will be executed (with one exception, if the process is currently
inside a kernel syscall it usually can't be interrupted, so the process
will exit as soon as the syscall finishes). This should normally not be
used except in extreme circumstances

How a particular program behaves when a signal is sent to it should be
described in the documentation.

For modern kde and gnome applications, the intended method of sending
commands to programs from scripts is with dbus.


To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups