SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

The killall5 command uses a very simple approach. It does an exhaustive search for processes an kills ALL of them, EXCEPT;

        itself
        its parent process (normally a shell)
        processes w/ session id of 1 or lower (init, kernel threads)

The benefits of doing an exhaustive search for processes is that it does not require the /proc file system to be mounted (the sysvinit killall5 seems to require this).

Note that if you run this killall5 from a remote login, the in.telnetd or sshd daemon maintaining your connection WILL BE KILLED. Even tho the shell would NOT be killed, this has a rather fatal effect on your connection...

Running killall5 without any arguments will send signal 0 (no signal). It prints the pid's it sends signals to as they are sent.

In other words, running killall5 just to test is safe, provided you do not supply any arguments.

Normal usage in a shutdown shellscript;

        # sigterm
        /sbin/killall5 -15
        # allow for graceous exit
        /usr/bin/sleep 5
        # sigkill (unmaskable)
        /sbin/killall5 -9


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.