Complete.Org: Mailing Lists: Archives: discussion: November 1998:
Re: [aclug-L] two minor questions
Home

Re: [aclug-L] two minor questions

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: aclug-L@xxxxxxxxxxxx
Subject: Re: [aclug-L] two minor questions
From: Jesse Kaufman <kaufmjes@xxxxxxxxxxxxxxx>
Date: Fri, 20 Nov 1998 13:10:10 -0600
Reply-to: aclug-L@xxxxxxxxxxxx

Bob Deep wrote:

> Jesse Kaufman wrote:
> >
> > any ideas why my computer hangs on shutting down the gpm stuff when i
> > reboot?  i've let it sit for a 1/2 an hour, and it never got through...
> >
> > also, how do i completely kill a process... when i do a kill (via
> > windowmaker), it kills the vis, but when i do a ps, it still shows
> > netscape-communicator (for example), or soffice.bin (all too many times)
> > as running... sometimes it's not listed in ps, but when i run ps ax, it
> > shows up with a 'STAT' of S, and many times, lists the TTY as ?, but i
> > try typing kill <pid>, and every time, it's still there... is there some
> > sort of kill command that is even more explicite and definate than kill
> > <pid>?
>
> First a bit of background on what kill does...  Kill really is
> mis-named, I think it should be called "signal" or something because it
> simply sends a signal to a process.  What's a signal?  Glad you asked.
> Signals are a way to communicate with a running process, and infact,
> signals are how the kernel controls a process (for the most part).  Lets
> say you issue a "sleep" command and tell the kernel you want to sleep
> for 10 seconds... What this does is simply tell the kernel to send you a
> signal (in this case a wake up signal) in 10 seconds, then your process
> goes to sleep (changes from computeable to wait for signal state).  In
> 10 seconds you get passed a signal which causes you to become
> computeable again.
>
> The kernel uses various signals to handle things like disk I/O, math
> errors, or memory access violations.  There are a few signals that you
> can use to communicate between processes if you want.. They are very
> flexable and can help in reducing the CPU loads involved in polling for
> a specific event... You can just set up to receive a signal when that
> event takes place, and go to sleep.  See the output of "kill -l" for a
> list of the sytem defined signals...
>
> On a sun box you can use "kill -9 <pid>" to send signal -9 (SIGKILL) to
> the process, if that fails to do it, you are left with having to
> reboot.  I beleive that plain kill sends signal -15 (SIGTERM) which is
> the "do it nice" shutdown signal where SIGKILL is the "just die and
> forget about cleaning up" signal.
>
> Some processes simply cannot die... But they are special situations....
> Like when a child looses it's parent so it has no way of returning a
> return value but for some reason, the kernel still thinks it needs to
> wait for the pid to be harvested...  Zombies I beleive is the term...
> In this case, the process just sits there forever or until a boot...
> The good thing is that they won't ever become computable and once they
> get swapped they won't get moved back into memory so they just end up
> taking up swap space and a process slot (for the most part).
>
> The processes you describe, if they are in the "S" state, means they are
> swapped to disk and cannot easily become computable..  You should be
> able to kill these processes with signal -9 but it may take a while for
> them to get swapped in... A Signal causes the process to become
> computable, and in order to die, it must run a bit of code..

KEWL!   Thanks a LOT!!!  that cleared up a lot of things i didn't really
understand about kill!!!

jesse


--
+============================+============================+
! Tabor College              !          ICQ UIN1: 4022791 !
! 400 S. Jefferson           !         ICQ UIN2: 13115282 !
! Hillsboro, KS 67063        ! kaufmjes@xxxxxxxxxxxxxxxxx !
+============================+============================+



---
This is the Air Capitol Linux Users Group discussion list.  If you
want to unsubscribe, send the word "unsubscribe" to
aclug-L-request@xxxxxxxxxxxx.  If you want to post to the list, send your
message to aclug-L@xxxxxxxxxxxx.



[Prev in Thread] Current Thread [Next in Thread]