> Date: Thu, 15 May 1997 10:19:47 -0700 (PDT) > From: Edward McKnight <[EMAIL PROTECTED]> > Subject: Re: How do I kill jobs? > To: [EMAIL PROTECTED], [EMAIL PROTECTED] > Cc: debian-user@lists.debian.org > Resent-From: debian-user@lists.debian.org > > This answer invariably comes up on Unix-related lists. > > This answer suggests that you use a howitzer to blow away what might be > only a field mouse. > > kill -9 is a *last resort*. Study up on signals. > > Start with no value at all; if that kill doesn't work you progress > through stronger and stronger signals until finally, if all other > signals have failed you reluctantly decide that the field mouse is in > fact utterly resistant. Then you go for the howitzer. > > Lots of programs written for the Unix environment will trap various > signals. An extremely common one is -3 (KILL, the same as ^C from the
^^^^^^^ Whoops! whoops! Caught by my own too-fastness! KILL *is* -9. Urk. Shoulda been QUIT. #define SIGHUP 1 /* hangup */ #define SIGINT 2 /* interrupt (rubout) */ #define SIGQUIT 3 /* quit (ASCII FS) */ #define SIGILL 4 /* illegal instruction (not reset when caught) */ #define SIGTRAP 5 /* trace trap (not reset when caught) */ #define SIGIOT 6 /* IOT instruction */ #define SIGABRT 6 /* used by abort, replace SIGIOT in the future */ #define SIGEMT 7 /* EMT instruction */ #define SIGFPE 8 /* floating point exception */ #define SIGKILL 9 /* kill (cannot be caught or ignored) */ #define SIGBUS 10 /* bus error */ #define SIGSEGV 11 /* segmentation violation */ #define SIGSYS 12 /* bad argument to system call */ #define SIGPIPE 13 /* write on a pipe with no one to read it */ #define SIGALRM 14 /* alarm clock */ #define SIGTERM 15 /* software termination signal from kill */ #define SIGUSR1 16 /* user defined signal 1 */ #define SIGUSR2 17 /* user defined signal 2 */ #define SIGCLD 18 /* child status change */ #define SIGCHLD 18 /* child status change alias (POSIX) */ #define SIGPWR 19 /* power-fail restart */ #define SIGWINCH 20 /* window size change */ #define SIGURG 21 /* urgent socket condition */ #define SIGPOLL 22 /* pollable event occured */ #define SIGIO SIGPOLL /* socket I/O possible (SIGPOLL alias) */ ... The above is from Solaris but *should* be the same as Linux. I think the preferred sequence is: no value, -15, -3, -9. Shoot me if I'm wrong, please ;) --emk > keyboard.) A program can trap the signal then ***do housekeeping*** and > exit gracefully. > > -9 *cannot* be caught. You increase your chances of causing the > interrupted program to have difficulty starting again if it stores > state on disk--things like hidden files that it uses for its own > purposes and normally deletes on exit--log file entries...whatever. > > Be civilized. Use -9 only in extremis. > > Note also that named values are considered by some to be superior to > numbers. See /usr/include/signal.h. > > --emk > > > > > Date: Thu, 15 May 1997 11:22:36 -0400 (EDT) > > From: Paul McDermott <[EMAIL PROTECTED]> > > To: Alberto Ruiz <[EMAIL PROTECTED]> > > cc: debian-user@lists.debian.org > > Subject: Re: How do I kill jobs? > > Resent-From: debian-user@lists.debian.org > > > > to kill a process you must be root if it is not run by you. the command > > is kill -9 (pid). To see the pid do a ps -aux. > > > > On Thu, 15 May 1997, Alberto Ruiz wrote: > > > > > Hi, > > > > > > How do I list all the jobs, in HP-UX or Solaris, I do ps -eaf and it > > > lists > everything, but I don't think is the same in Linux. I'm just guessing i way to > change the setting on Xwindows by killing Xwindows, modifying the XF86Config > file andrestarting Xwindows. Am I going in the right way? > > > > > > Alberto Ruiz > > > [EMAIL PROTECTED] > > > > > > > > > -- > > > TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to > > > [EMAIL PROTECTED] . > > > Trouble? e-mail to [EMAIL PROTECTED] . > > > > > > > > > > > > -- > > TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to > > [EMAIL PROTECTED] . > > Trouble? e-mail to [EMAIL PROTECTED] . > > > > > -- > TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to > [EMAIL PROTECTED] . > Trouble? e-mail to [EMAIL PROTECTED] . > -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .