HP3000-L Archives

December 2000, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Emerson, Tom # El Monte" <[log in to unmask]>
Reply To:
Emerson, Tom # El Monte
Date:
Tue, 5 Dec 2000 14:12:50 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (32 lines)
> -----Original Message-----
> From: Donna Garverick [mailto:[log in to unmask]]
[...]
> samba....  i guess most of these s/w packages 'know' what to do
> when they're killed (btw, could they have picked a worse name
> for this command?).  that is, they do a 'gracefullish'
> shutdown.  to them, abortjob is like a big, heavy sledge
> hammer.

As I understand it, the way "unix" thingies handle "kill" is that the kill
command actually generates a SIGNAL to the program.  A close look at the
kill command shows that you can SPECIFY exactly which SIGNAL to send -- the
two most common are SIGHUP and SIGKILL  (see "man kill" in the shell or your
local unix/linux command prompt)

SIGHUP (no, not a special interest group for Helpless Unix People) is the
"hang up" signal.  Most programs treat this as a way of allowing the user to
indicate "your configuration has changed, please re-read the file and act
accordingly"

SIGKILL is closer to the more drastic "sledgehammer" of ABORT/ABORTJOB.
There is also SIGTERM, I believe, but I don't recall this being used very
much. (at least, not for this purpose)

From a programming perspective, you can write your own "signal handlers"
that can trap things like SIGHUP and SIGKILL and act in a manner similar to
"the unix way" -- HUP causes a refresh of configuration options, and KILL
should correspond to an exit or quit command.

(in some cases, you can even cause your program to effectively IGNORE the
KILL signal...)

ATOM RSS1 RSS2